Nakama .NET 3.1.1
.NET client for Nakama server written in C
Nakama.Session Class Reference

More...

Inheritance diagram for Nakama.Session:
Nakama.ISession

Public Member Functions

bool HasExpired (DateTime offset)
 Check the session has expired against the offset time. More...
 
bool HasRefreshExpired (DateTime offset)
 Check if the refresh token has expired against the offset time. More...
 
override string ToString ()
 

Static Public Member Functions

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

Static Public Attributes

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

Properties

string AuthToken [get]
 
bool Created [get]
 
long CreateTime [get]
 
long ExpireTime [get]
 
bool IsExpired [get]
 
bool IsRefreshExpired [get]
 
long RefreshExpireTime [get]
 
string RefreshToken [get]
 
IDictionary< string, string > Vars [get]
 
string Username [get]
 
string UserId [get]
 
- Properties inherited from Nakama.ISession
string AuthToken [get]
 The authorization token used to construct this session. More...
 
bool Created [get]
 If the user account for this session was just created. More...
 
long CreateTime [get]
 The UNIX timestamp when this session was created. More...
 
long ExpireTime [get]
 The UNIX timestamp when this session will expire. More...
 
bool IsExpired [get]
 If the session has expired. More...
 
bool IsRefreshExpired [get]
 If the refresh token has expired. More...
 
long RefreshExpireTime [get]
 The UNIX timestamp when the refresh token will expire. More...
 
string RefreshToken [get]
 Refresh token that can be used for session token renewal. More...
 
IDictionary< string, string > Vars [get]
 Any custom properties associated with this session. More...
 
string Username [get]
 The username of the user who owns this session. More...
 
string UserId [get]
 The ID of the user who owns this session. More...
 

Detailed Description

Member Function Documentation

◆ HasExpired()

bool Nakama.Session.HasExpired ( DateTime  offset)
inline

Check the session has expired against the offset time.

Implements Nakama.ISession.

◆ HasRefreshExpired()

bool Nakama.Session.HasRefreshExpired ( DateTime  offset)
inline

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

Implements Nakama.ISession.

◆ Restore()

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

◆ ToString()

override string Nakama.Session.ToString ( )
inline

Member Data Documentation

◆ Epoch

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

Property Documentation

◆ AuthToken

string Nakama.Session.AuthToken
get

◆ Created

bool Nakama.Session.Created
get

◆ CreateTime

long Nakama.Session.CreateTime
get

◆ ExpireTime

long Nakama.Session.ExpireTime
get

◆ IsExpired

bool Nakama.Session.IsExpired
get

◆ IsRefreshExpired

bool Nakama.Session.IsRefreshExpired
get

◆ RefreshExpireTime

long Nakama.Session.RefreshExpireTime
get

◆ RefreshToken

string Nakama.Session.RefreshToken
get

◆ UserId

string Nakama.Session.UserId
get

◆ Username

string Nakama.Session.Username
get

◆ Vars

IDictionary<string, string> Nakama.Session.Vars
get


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