Photon Server API Documentation v5.0RC1

Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
Photon.Common.Authentication.AuthTokenFactory Class Reference

Public Member Functions

void Initialize (string secret, string authSecret, TimeSpan expirationtime, string tokenIssuer="")
 
virtual AuthenticationToken CreateAuthenticationToken (IAuthenticateRequest authRequest, AuthSettings authSettings, string userId, Dictionary< string, object > authCookie)
 
AuthenticationToken CreateAuthenticationToken (string userId, IAuthenticateRequest authRequest)
 Create a renewed Authentication Token on Master server - to be validated on GS More...
 
string EncryptAuthenticationToken (AuthenticationToken token, bool renew)
 
bool DecryptAuthenticationToken (string authTokenEncrypted, out AuthenticationToken authToken, out string errorMsg)
 
bool DecryptAuthenticationTokenV1 (string authTokenEncrypted, out AuthenticationToken authToken, out string errorMsg)
 
bool DecryptAuthenticationTokenV2 (string authTokenEncrypted, out AuthenticationToken authToken, out string errorMsg)
 
byte[] EncryptAuthenticationTokenBinary (AuthenticationToken token, bool renew)
 
bool DecryptAuthenticationTokenBinary (byte[] authTokenEncrypted, int offset, int len, out AuthenticationToken authToken, out string errorMsg)
 
string EncryptAuthenticationTokenV2 (AuthenticationToken token, bool renew)
 

Protected Member Functions

virtual bool TryDeserializeToken (byte[] tokenData, out AuthenticationToken authToken, out string errorMsg)
 
void SetupToken (AuthenticationToken token)
 

Static Protected Attributes

const byte Version2 = 0x02
 

Member Function Documentation

◆ CreateAuthenticationToken() [1/2]

virtual AuthenticationToken Photon.Common.Authentication.AuthTokenFactory.CreateAuthenticationToken ( IAuthenticateRequest  authRequest,
AuthSettings  authSettings,
string  userId,
Dictionary< string, object >  authCookie 
)
inlinevirtual

◆ CreateAuthenticationToken() [2/2]

AuthenticationToken Photon.Common.Authentication.AuthTokenFactory.CreateAuthenticationToken ( string  userId,
IAuthenticateRequest  authRequest 
)
inline

Create a renewed Authentication Token on Master server - to be validated on GS

Parameters
userId
authRequest
Returns

◆ DecryptAuthenticationToken()

bool Photon.Common.Authentication.AuthTokenFactory.DecryptAuthenticationToken ( string  authTokenEncrypted,
out AuthenticationToken  authToken,
out string  errorMsg 
)
inline

◆ DecryptAuthenticationTokenBinary()

bool Photon.Common.Authentication.AuthTokenFactory.DecryptAuthenticationTokenBinary ( byte[]  authTokenEncrypted,
int  offset,
int  len,
out AuthenticationToken  authToken,
out string  errorMsg 
)
inline

◆ DecryptAuthenticationTokenV1()

bool Photon.Common.Authentication.AuthTokenFactory.DecryptAuthenticationTokenV1 ( string  authTokenEncrypted,
out AuthenticationToken  authToken,
out string  errorMsg 
)
inline

◆ DecryptAuthenticationTokenV2()

bool Photon.Common.Authentication.AuthTokenFactory.DecryptAuthenticationTokenV2 ( string  authTokenEncrypted,
out AuthenticationToken  authToken,
out string  errorMsg 
)
inline

◆ EncryptAuthenticationToken()

string Photon.Common.Authentication.AuthTokenFactory.EncryptAuthenticationToken ( AuthenticationToken  token,
bool  renew 
)
inline

◆ EncryptAuthenticationTokenBinary()

byte [] Photon.Common.Authentication.AuthTokenFactory.EncryptAuthenticationTokenBinary ( AuthenticationToken  token,
bool  renew 
)
inline

◆ EncryptAuthenticationTokenV2()

string Photon.Common.Authentication.AuthTokenFactory.EncryptAuthenticationTokenV2 ( AuthenticationToken  token,
bool  renew 
)
inline

◆ Initialize()

void Photon.Common.Authentication.AuthTokenFactory.Initialize ( string  secret,
string  authSecret,
TimeSpan  expirationtime,
string  tokenIssuer = "" 
)
inline

◆ SetupToken()

void Photon.Common.Authentication.AuthTokenFactory.SetupToken ( AuthenticationToken  token)
inlineprotected

◆ TryDeserializeToken()

virtual bool Photon.Common.Authentication.AuthTokenFactory.TryDeserializeToken ( byte[]  tokenData,
out AuthenticationToken  authToken,
out string  errorMsg 
)
inlineprotectedvirtual

Member Data Documentation

◆ Version2

const byte Photon.Common.Authentication.AuthTokenFactory.Version2 = 0x02
staticprotected