Skip to main content

AuthSession Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.Storages.Proto

AuthSession Class

Represents an authentication session for a logged-in user

public sealed class AuthSession : Google.Protobuf.IMessage<Abblix.Oidc.Server.Features.Storages.Proto.AuthSession>, Google.Protobuf.IMessage, System.IEquatable<Abblix.Oidc.Server.Features.Storages.Proto.AuthSession>, Google.Protobuf.IDeepCloneable<Abblix.Oidc.Server.Features.Storages.Proto.AuthSession>, Google.Protobuf.IBufferMessage

Inheritance System.Object → AuthSession

Implements Google.Protobuf.IMessage<AuthSession>, Google.Protobuf.IMessage, System.IEquatable<AuthSession>, Google.Protobuf.IDeepCloneable<AuthSession>, Google.Protobuf.IBufferMessage

Fields

AuthSession.AdditionalClaimsFieldNumber Field

Field number for the "additional_claims" field.

public const int AdditionalClaimsFieldNumber = 10;

Field Value

System.Int32

AuthSession.AffectedClientIdsFieldNumber Field

Field number for the "affected_client_ids" field.

public const int AffectedClientIdsFieldNumber = 6;

Field Value

System.Int32

AuthSession.AuthContextClassRefFieldNumber Field

Field number for the "auth_context_class_ref" field.

public const int AuthContextClassRefFieldNumber = 5;

Field Value

System.Int32

AuthSession.AuthenticationMethodReferencesFieldNumber Field

Field number for the "authentication_method_references" field.

public const int AuthenticationMethodReferencesFieldNumber = 7;

Field Value

System.Int32

AuthSession.AuthenticationTimeFieldNumber Field

Field number for the "authentication_time" field.

public const int AuthenticationTimeFieldNumber = 3;

Field Value

System.Int32

AuthSession.EmailFieldNumber Field

Field number for the "email" field.

public const int EmailFieldNumber = 8;

Field Value

System.Int32

AuthSession.EmailVerifiedFieldNumber Field

Field number for the "email_verified" field.

public const int EmailVerifiedFieldNumber = 9;

Field Value

System.Int32

AuthSession.IdentityProviderFieldNumber Field

Field number for the "identity_provider" field.

public const int IdentityProviderFieldNumber = 4;

Field Value

System.Int32

AuthSession.SessionIdFieldNumber Field

Field number for the "session_id" field.

public const int SessionIdFieldNumber = 2;

Field Value

System.Int32

AuthSession.SubjectFieldNumber Field

Field number for the "subject" field.

public const int SubjectFieldNumber = 1;

Field Value

System.Int32

Properties

AuthSession.AdditionalClaims Property

Additional custom claims stored as a structured JSON object. Struct provides efficient binary serialization with support for nested objects, arrays, and primitive values (string, number, boolean, null). Maps directly to C# JsonObject without intermediate JSON string encoding.

public Google.Protobuf.WellKnownTypes.Struct AdditionalClaims { get; set; }

Property Value

Google.Protobuf.WellKnownTypes.Struct

AuthSession.AffectedClientIds Property

Client identifiers the user has interacted with during the session

public Google.Protobuf.Collections.RepeatedField<string> AffectedClientIds { get; }

Property Value

Google.Protobuf.Collections.RepeatedField<System.String>

AuthSession.AuthContextClassRef Property

Authentication context class reference (SAML/OIDC)

public string AuthContextClassRef { get; set; }

Property Value

System.String

AuthSession.AuthenticationMethodReferences Property

Authentication methods used (AMR values)

public Google.Protobuf.Collections.RepeatedField<string> AuthenticationMethodReferences { get; }

Property Value

Google.Protobuf.Collections.RepeatedField<System.String>

AuthSession.AuthenticationTime Property

The timestamp when the user was authenticated

public Google.Protobuf.WellKnownTypes.Timestamp AuthenticationTime { get; set; }

Property Value

Google.Protobuf.WellKnownTypes.Timestamp

AuthSession.Email Property

The email address used for authentication

public string Email { get; set; }

Property Value

System.String

AuthSession.EmailVerified Property

Whether the email address has been verified

public bool EmailVerified { get; set; }

Property Value

System.Boolean

AuthSession.HasAuthContextClassRef Property

Gets whether the "auth_context_class_ref" field is set

public bool HasAuthContextClassRef { get; }

Property Value

System.Boolean

AuthSession.HasEmail Property

Gets whether the "email" field is set

public bool HasEmail { get; }

Property Value

System.Boolean

AuthSession.HasEmailVerified Property

Gets whether the "email_verified" field is set

public bool HasEmailVerified { get; }

Property Value

System.Boolean

AuthSession.IdentityProvider Property

The provider used to authenticate the user's identity

public string IdentityProvider { get; set; }

Property Value

System.String

AuthSession.SessionId Property

The unique identifier of the session

public string SessionId { get; set; }

Property Value

System.String

AuthSession.Subject Property

The unique identifier for the user

public string Subject { get; set; }

Property Value

System.String

Methods

AuthSession.ClearAuthContextClassRef() Method

Clears the value of the "auth_context_class_ref" field

public void ClearAuthContextClassRef();

AuthSession.ClearEmail() Method

Clears the value of the "email" field

public void ClearEmail();

AuthSession.ClearEmailVerified() Method

Clears the value of the "email_verified" field

public void ClearEmailVerified();