Skip to main content

Class SessionIdAuthenticator

Inheritance
System.Object
Mirage.Authentication.NetworkAuthenticator
Mirage.Authentication.NetworkAuthenticator<Mirage.Authenticators.SessionId.SessionKeyMessage>
Inherited Members
Show

Mirage.Authentication.NetworkAuthenticator<Mirage.Authenticators.SessionId.SessionKeyMessage>.AuthenticateAsync(Mirage.INetworkPlayer, Mirage.Authenticators.SessionId.SessionKeyMessage)

Mirage.Authentication.NetworkAuthenticator<Mirage.Authenticators.SessionId.SessionKeyMessage>.SendAuthentication(Mirage.NetworkClient, Mirage.Authenticators.SessionId.SessionKeyMessage)

Mirage.Authentication.NetworkAuthenticator.AuthenticatorName

Syntax
public class SessionIdAuthenticator : NetworkAuthenticator<SessionKeyMessage>, INetworkAuthenticator

Fields

NO_KEY_ERROR

Declaration
public const string NO_KEY_ERROR = "Empty key from client"

NOT_FOUND_ERROR

Declaration
public const string NOT_FOUND_ERROR = "No session found"

SessionIDLength

Declaration
public int SessionIDLength

TimeoutMinutes

Declaration
public int TimeoutMinutes

ClientIdStore

Set on client to save key somewhere. For example as a cookie on webgl

By default it is just stored in memory

Declaration
public ISessionIdStore ClientIdStore

Methods

Authenticate(INetworkPlayer, SessionKeyMessage)

Declaration
protected override AuthenticationResult Authenticate(INetworkPlayer player, SessionKeyMessage message)
Parameters
TypeNameDescription
Mirage.INetworkPlayerplayer
Mirage.Authenticators.SessionId.SessionKeyMessagemessage
Returns
TypeDescription
Mirage.Authentication.AuthenticationResult

CreateOrRefreshSession(INetworkPlayer)

Declaration
public ArraySegment<byte> CreateOrRefreshSession(INetworkPlayer player)
Parameters
TypeNameDescription
Mirage.INetworkPlayerplayer
Returns
TypeDescription
System.ArraySegment<System.Byte>