Nakama .NET Client SDK 3.8.0
Nakama .NET Client SDK
Loading...
Searching...
No Matches
Satori.Session Class Reference

More...

Inheritance diagram for Satori.Session:
Satori.ISession

Public Member Functions

bool HasExpired (DateTime offset)
 Check the session has expired against the offset time.
Parameters
offsetThe 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
offsetThe datetime to compare against this refresh token.
Returns
If refresh token has expired.

 
override string ToString ()
 

Static Public Member Functions

static ISession Restore (string authToken, string refreshToken=null)
 Restore a session from the auth token.
 

Static Public Attributes

static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)
 

Properties

string AuthToken [get]
 The authorization token used to construct this session.
 
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.
 
string IdentityId [get]
 The ID of the user who owns this session.
 
- Properties inherited from Satori.ISession

Detailed Description

Member Function Documentation

◆ HasExpired()

bool Satori.Session.HasExpired ( DateTime  offset)
inline

Check the session has expired against the offset time.

Parameters
offsetThe datetime to compare against this session.
Returns
If the session has expired.

Implements Satori.ISession.

◆ HasRefreshExpired()

bool Satori.Session.HasRefreshExpired ( DateTime  offset)
inline

Check if the refresh token has expired against the offset time.

Parameters
offsetThe datetime to compare against this refresh token.
Returns
If refresh token has expired.

Implements Satori.ISession.

◆ Restore()

static ISession Satori.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
authTokenThe authorization token to restore as a session.
refreshTokenThe refresh token for the session.
Returns
A session.

◆ ToString()

override string Satori.Session.ToString ( )
inline

Member Data Documentation

◆ Epoch

readonly DateTime Satori.Session.Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)
static

Property Documentation

◆ AuthToken

string Satori.Session.AuthToken
get

The authorization token used to construct this session.

Implements Satori.ISession.

◆ ExpireTime

long Satori.Session.ExpireTime
get

The UNIX timestamp when this session will expire.

Implements Satori.ISession.

◆ IdentityId

string Satori.Session.IdentityId
get

The ID of the user who owns this session.

Implements Satori.ISession.

◆ IsExpired

bool Satori.Session.IsExpired
get

If the session has expired.

Implements Satori.ISession.

◆ IsRefreshExpired

bool Satori.Session.IsRefreshExpired
get

If the refresh token has expired.

Implements Satori.ISession.

◆ RefreshExpireTime

long Satori.Session.RefreshExpireTime
get

The UNIX timestamp when the refresh token will expire.

Implements Satori.ISession.

◆ RefreshToken

string Satori.Session.RefreshToken
get

Refresh token that can be used for session token renewal.

Implements Satori.ISession.


The documentation for this class was generated from the following file: