Class AuthenticationResult
Namespace: Void.Proxy.Api.Events.Authentication
Assembly: Void.Proxy.Api.dll
public record AuthenticationResult : IEquatable<AuthenticationResult>Inheritance
Implements
IEquatable<AuthenticationResult>
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
AuthenticationResult(bool, string?)
public AuthenticationResult(bool IsAuthenticated, string? Message = null)Parameters
IsAuthenticated bool
Message string?
Properties
AlreadyAuthenticated
public static AuthenticationResult AlreadyAuthenticated { get; }Property Value
Authenticated
Gets a successful authentication result with a default human-readable message.
public static AuthenticationResult Authenticated { get; }Property Value
Examples
var result = AuthenticationResult.Authenticated;
if (result.IsAuthenticated)
{
// Continue login flow.
}
Remarks
Each access creates a new record instance instead of returning a cached object.
Use this value for successful authentication branches that should compare by record value semantics
(for example, checks against
See Also
AuthenticationResult.AlreadyAuthenticated, AuthenticationResult.NoResult
IsAuthenticated
public bool IsAuthenticated { get; init; }Property Value
Message
public string? Message { get; init; }Property Value
NoResult
Gets a sentinel authentication result that indicates no final outcome has been produced yet.
public static AuthenticationResult NoResult { get; }Property Value
Examples
if (result == AuthenticationResult.NoResult)
continue;
Remarks
This value is used as a control signal while processing server login packets: handlers return it to continue waiting for more packets.
Equality checks against
See Also
AuthenticationResult.Authenticated
NotAuthenticatedPlayer
public static AuthenticationResult NotAuthenticatedPlayer { get; }Property Value
NotAuthenticatedServer
public static AuthenticationResult NotAuthenticatedServer { get; }