Skip to main content

Struct AuthenticationResult

Result from Authentication, Use static methods to create new instance

Syntax
public struct AuthenticationResult

Properties

Success

Declaration
public bool Success { get; }

Authenticator

Which Authenticator gave success

Declaration
public INetworkAuthenticator Authenticator { get; }

Data

Auth data from Success, will be set on INetworkPlayer

Declaration
public object Data { get; }

Reason

Can be reason for Success of fail

Declaration
public string Reason { get; }

Methods

CreateSuccess(String)

Declaration
public static AuthenticationResult CreateSuccess(string reason)
Parameters
TypeNameDescription
System.Stringreason
Returns
TypeDescription
Mirage.Authentication.AuthenticationResult

CreateSuccess(INetworkAuthenticator, Object)

Declaration
public static AuthenticationResult CreateSuccess(INetworkAuthenticator authenticator, object data)
Parameters
TypeNameDescription
Mirage.Authentication.INetworkAuthenticatorauthenticator
System.Objectdata
Returns
TypeDescription
Mirage.Authentication.AuthenticationResult

CreateSuccess(String, INetworkAuthenticator, Object)

Declaration
public static AuthenticationResult CreateSuccess(string reason, INetworkAuthenticator authenticator, object data)
Parameters
TypeNameDescription
System.Stringreason
Mirage.Authentication.INetworkAuthenticatorauthenticator
System.Objectdata
Returns
TypeDescription
Mirage.Authentication.AuthenticationResult

CreateFail(String)

Declaration
public static AuthenticationResult CreateFail(string reason)
Parameters
TypeNameDescription
System.Stringreason
Returns
TypeDescription
Mirage.Authentication.AuthenticationResult

CreateFail(String, INetworkAuthenticator)

Declaration
public static AuthenticationResult CreateFail(string reason, INetworkAuthenticator authenticator)
Parameters
TypeNameDescription
System.Stringreason
Mirage.Authentication.INetworkAuthenticatorauthenticator
Returns
TypeDescription
Mirage.Authentication.AuthenticationResult