AuthResult
Outcome of checking the token a client presented in Hello (see OidcTokenValidator).
Nebula · Packages/com.1by3.nebula/Runtime/Gateway/ClientAuth.cspublic struct AuthResultOutcome of checking the token a client presented in Hello (see OidcTokenValidator).
Fields
Ok
public bool Ok;The token was valid; Identity, Issuer and Subject are set.
Identity
public string Identity;The player's stable identity (PlayerIdentity.Derive).
Issuer
public string Issuer;The token's iss claim: the OpenID provider, or PlayerIdentity.AnonymousIssuer for a gateway-issued token.
Subject
public string Subject;The token's sub claim: the provider's user id.
Error
public string Error;Why the token was rejected (empty when Ok).
Claims
public Dictionary<string, object> Claims;Every claim of the verified token, as parsed JSON (strings, doubles, booleans, lists and objects). Set only for a token verified against a trusted OpenID provider; null for a gateway-issued anonymous token. The gateway forwards the claims NebulaConfig.ForwardedClaims names from here (PlayerClaims.Select).
Methods
Fail
public static AuthResult Fail(string error);Accept
public static AuthResult Accept(string issuer, string subject);
public static AuthResult Accept(string issuer, string subject, Dictionary<string, object> claims);An accepted token, with the verified token's claims (null for none).
AnonymousIdentityIssuer
Identities the gateway hands to clients that present no token: an HS256 token with iss PlayerIdentity.AnonymousIssuer and a random sub, which the client keeps and presents on its next connection to get the same AuthResult.Identity back.
InterestLinkReason
Why a gateway holds a link to a worker.