More...
|
| bool | HasExpired (DateTime offset) |
| | Check the session has expired against the offset time.- Parameters
-
| offset | The datetime to compare against this session. |
- Returns
- If the session has expired.
|
| bool | HasRefreshExpired (DateTime offset) |
| | Check if the refresh token has expired against the offset time.- Parameters
-
| offset | The datetime to compare against this refresh token. |
- Returns
- If refresh token has expired.
|
| override string | ToString () |
| void | Update (string authToken, string refreshToken) |
| | Update the current session token with a new authorization token and refresh token.
|
|
| static ISession | Restore (string authToken, string refreshToken=null) |
| | Restore a session from the auth token.
|
|
| static readonly DateTime | Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc) |
|
| string | AuthToken [get] |
| | The authorization token used to construct this session.
|
| bool | Created [get] |
| | If the user account for this session was just created.
|
| long | CreateTime [get] |
| | The UNIX timestamp when this session was created.
|
| long | ExpireTime [get] |
| | The UNIX timestamp when this session will expire.
|
| bool | IsExpired [get] |
| | If the session has expired.
|
| bool | IsRefreshExpired [get] |
| | If the refresh token has expired.
|
| long | RefreshExpireTime [get] |
| | The UNIX timestamp when the refresh token will expire.
|
| string | RefreshToken [get] |
| | Refresh token that can be used for session token renewal.
|
| IDictionary< string, string > | Vars [get] |
| | Any custom properties associated with this session.
|
| string | Username [get] |
| | The username of the user who owns this session.
|
| string | UserId [get] |
| | The ID of the user who owns this session.
|
◆ HasExpired()
| bool Nakama.Session.HasExpired |
( |
DateTime | offset | ) |
|
|
inline |
Check the session has expired against the offset time.
- Parameters
-
| offset | The datetime to compare against this session. |
- Returns
- If the session has expired.
Implements Nakama.ISession.
◆ HasRefreshExpired()
| bool Nakama.Session.HasRefreshExpired |
( |
DateTime | offset | ) |
|
|
inline |
Check if the refresh token has expired against the offset time.
- Parameters
-
| offset | The datetime to compare against this refresh token. |
- Returns
- If refresh token has expired.
Implements Nakama.ISession.
◆ Restore()
| ISession Nakama.Session.Restore |
( |
string | authToken, |
|
|
string | refreshToken = null ) |
|
inlinestatic |
Restore a session from the auth token.
A null or empty authentication token will return null.
- Parameters
-
| authToken | The authorization token to restore as a session. |
| refreshToken | The refresh token for the session. |
- Returns
- A session.
◆ ToString()
| override string Nakama.Session.ToString |
( |
| ) |
|
|
inline |
◆ Update()
| void Nakama.Session.Update |
( |
string | authToken, |
|
|
string | refreshToken ) |
|
inline |
Update the current session token with a new authorization token and refresh token.
- Parameters
-
| authToken | The authorization token to update into the session. |
| refreshToken | The refresh token to update into the session. |
◆ Epoch
| readonly DateTime Nakama.Session.Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc) |
|
static |
◆ AuthToken
| string Nakama.Session.AuthToken |
|
get |
The authorization token used to construct this session.
Implements Nakama.ISession.
◆ Created
| bool Nakama.Session.Created |
|
get |
If the user account for this session was just created.
Implements Nakama.ISession.
◆ CreateTime
| long Nakama.Session.CreateTime |
|
get |
The UNIX timestamp when this session was created.
Implements Nakama.ISession.
◆ ExpireTime
| long Nakama.Session.ExpireTime |
|
get |
The UNIX timestamp when this session will expire.
Implements Nakama.ISession.
◆ IsExpired
| bool Nakama.Session.IsExpired |
|
get |
◆ IsRefreshExpired
| bool Nakama.Session.IsRefreshExpired |
|
get |
◆ RefreshExpireTime
| long Nakama.Session.RefreshExpireTime |
|
get |
The UNIX timestamp when the refresh token will expire.
Implements Nakama.ISession.
◆ RefreshToken
| string Nakama.Session.RefreshToken |
|
get |
Refresh token that can be used for session token renewal.
Implements Nakama.ISession.
◆ UserId
| string Nakama.Session.UserId |
|
get |
◆ Username
| string Nakama.Session.Username |
|
get |
The username of the user who owns this session.
Implements Nakama.ISession.
◆ Vars
| IDictionary<string, string> Nakama.Session.Vars |
|
get |
Any custom properties associated with this session.
Implements Nakama.ISession.
The documentation for this class was generated from the following file: