Photon Server API Documentation v5.0RC1

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

Classes

class  AuthQueueState
 
class  Result
 
class  ResultCodes
 

Public Member Functions

 CustomAuthHandler (IHttpRequestQueueCountersFactory factory, HttpQueueSettings httpQueueSettings)
 
void AuthenticateClient (ICustomAuthPeer peer, IAuthenticateRequest authRequest, AuthSettings authSettings, SendParameters sendParameters, object state, bool strictCustomAuth=true)
 
void InitializeFromConfig ()
 
void OnCustomAuthenticationError (ICustomAuthPeer peer, IAuthenticateRequest authRequest, SendParameters sendParameters, CustomAuthResultCounters counters, string errorMsg)
 
IClientAuthenticationQueue AddNewAuthProvider (string url, string nameValuePairAsQueryString, bool rejectIfUnavailable, ClientAuthenticationType authenticationType, bool forwardAsJson, string instanceName)
 

Protected Member Functions

 CustomAuthHandler (IHttpRequestQueueCountersFactory factory, IFiber fiber, HttpQueueSettings httpQueueSettings, Action beforeAction=null, Action afterAction=null)
 
virtual IClientAuthenticationQueue CreateClientAuthenticationQueue (string url, string nameValuePairAsQueryString, bool rejectIfUnavailable, ClientAuthenticationType authenticationType, bool forwardAsJson, string instanceName)
 
void AddNewAuthProvider (ClientAuthenticationType authenticationType, IClientAuthenticationQueue authService)
 
virtual void OnAuthenticateClient (ICustomAuthPeer peer, IAuthenticateRequest authRequest, AuthSettings authSettings, SendParameters sendParameters, object state, bool strictCustomAuth=true)
 
virtual void IncrementResultCounters (CustomAuthenticationResult customAuthResult, CustomAuthResultCounters instance, long ticks)
 
virtual void IncrementErrors (ClientAuthenticationType authenticationType, CustomAuthResultCounters instance)
 
virtual void IncrementQueueTimeouts (CustomAuthResultCounters instance)
 
virtual void IncrementQueueFullErrors (CustomAuthResultCounters instance)
 
virtual void IncrementHttpErrors (ClientAuthenticationType queueClientAuthenticationType, CustomAuthResultCounters queueCustomData)
 
virtual void IncrementHttpTimeouts (ClientAuthenticationType queueClientAuthenticationType, CustomAuthResultCounters queueCustomData)
 

Static Protected Member Functions

static DateTimeOffset FromUnixTimeSeconds (long seconds)
 

Protected Attributes

readonly IFiber fiber
 
Dictionary< ClientAuthenticationType, IClientAuthenticationQueueauthenticationServices = new Dictionary<ClientAuthenticationType, IClientAuthenticationQueue>()
 
bool isAnonymousAccessAllowed
 

Properties

bool IsAnonymousAccessAllowed [get, protected set]
 
bool IsClientAuthenticationEnabled [get, protected set]
 

Constructor & Destructor Documentation

◆ CustomAuthHandler() [1/2]

Photon.Common.Authentication.CustomAuthHandler.CustomAuthHandler ( IHttpRequestQueueCountersFactory  factory,
HttpQueueSettings  httpQueueSettings 
)
inline

◆ CustomAuthHandler() [2/2]

Photon.Common.Authentication.CustomAuthHandler.CustomAuthHandler ( IHttpRequestQueueCountersFactory  factory,
IFiber  fiber,
HttpQueueSettings  httpQueueSettings,
Action  beforeAction = null,
Action  afterAction = null 
)
inlineprotected

Member Function Documentation

◆ AddNewAuthProvider() [1/2]

void Photon.Common.Authentication.CustomAuthHandler.AddNewAuthProvider ( ClientAuthenticationType  authenticationType,
IClientAuthenticationQueue  authService 
)
inlineprotected

◆ AddNewAuthProvider() [2/2]

IClientAuthenticationQueue Photon.Common.Authentication.CustomAuthHandler.AddNewAuthProvider ( string  url,
string  nameValuePairAsQueryString,
bool  rejectIfUnavailable,
ClientAuthenticationType  authenticationType,
bool  forwardAsJson,
string  instanceName 
)
inline

◆ AuthenticateClient()

void Photon.Common.Authentication.CustomAuthHandler.AuthenticateClient ( ICustomAuthPeer  peer,
IAuthenticateRequest  authRequest,
AuthSettings  authSettings,
SendParameters  sendParameters,
object  state,
bool  strictCustomAuth = true 
)
inline

◆ CreateClientAuthenticationQueue()

virtual IClientAuthenticationQueue Photon.Common.Authentication.CustomAuthHandler.CreateClientAuthenticationQueue ( string  url,
string  nameValuePairAsQueryString,
bool  rejectIfUnavailable,
ClientAuthenticationType  authenticationType,
bool  forwardAsJson,
string  instanceName 
)
inlineprotectedvirtual

◆ FromUnixTimeSeconds()

static DateTimeOffset Photon.Common.Authentication.CustomAuthHandler.FromUnixTimeSeconds ( long  seconds)
inlinestaticprotected

◆ IncrementErrors()

virtual void Photon.Common.Authentication.CustomAuthHandler.IncrementErrors ( ClientAuthenticationType  authenticationType,
CustomAuthResultCounters  instance 
)
inlineprotectedvirtual

◆ IncrementHttpErrors()

virtual void Photon.Common.Authentication.CustomAuthHandler.IncrementHttpErrors ( ClientAuthenticationType  queueClientAuthenticationType,
CustomAuthResultCounters  queueCustomData 
)
inlineprotectedvirtual

◆ IncrementHttpTimeouts()

virtual void Photon.Common.Authentication.CustomAuthHandler.IncrementHttpTimeouts ( ClientAuthenticationType  queueClientAuthenticationType,
CustomAuthResultCounters  queueCustomData 
)
inlineprotectedvirtual

◆ IncrementQueueFullErrors()

virtual void Photon.Common.Authentication.CustomAuthHandler.IncrementQueueFullErrors ( CustomAuthResultCounters  instance)
inlineprotectedvirtual

◆ IncrementQueueTimeouts()

virtual void Photon.Common.Authentication.CustomAuthHandler.IncrementQueueTimeouts ( CustomAuthResultCounters  instance)
inlineprotectedvirtual

◆ IncrementResultCounters()

virtual void Photon.Common.Authentication.CustomAuthHandler.IncrementResultCounters ( CustomAuthenticationResult  customAuthResult,
CustomAuthResultCounters  instance,
long  ticks 
)
inlineprotectedvirtual

◆ InitializeFromConfig()

void Photon.Common.Authentication.CustomAuthHandler.InitializeFromConfig ( )
inline

◆ OnAuthenticateClient()

virtual void Photon.Common.Authentication.CustomAuthHandler.OnAuthenticateClient ( ICustomAuthPeer  peer,
IAuthenticateRequest  authRequest,
AuthSettings  authSettings,
SendParameters  sendParameters,
object  state,
bool  strictCustomAuth = true 
)
inlineprotectedvirtual

◆ OnCustomAuthenticationError()

void Photon.Common.Authentication.CustomAuthHandler.OnCustomAuthenticationError ( ICustomAuthPeer  peer,
IAuthenticateRequest  authRequest,
SendParameters  sendParameters,
CustomAuthResultCounters  counters,
string  errorMsg 
)
inline

Member Data Documentation

◆ authenticationServices

Dictionary<ClientAuthenticationType, IClientAuthenticationQueue> Photon.Common.Authentication.CustomAuthHandler.authenticationServices = new Dictionary<ClientAuthenticationType, IClientAuthenticationQueue>()
protected

◆ fiber

readonly IFiber Photon.Common.Authentication.CustomAuthHandler.fiber
protected

◆ isAnonymousAccessAllowed

bool Photon.Common.Authentication.CustomAuthHandler.isAnonymousAccessAllowed
protected

Property Documentation

◆ IsAnonymousAccessAllowed

bool Photon.Common.Authentication.CustomAuthHandler.IsAnonymousAccessAllowed
getprotected set

◆ IsClientAuthenticationEnabled

bool Photon.Common.Authentication.CustomAuthHandler.IsClientAuthenticationEnabled
getprotected set