ISessionManagementService Interface
Abblix.Oidc.Server
Abblix.Oidc.Server.Features.SessionManagement
ISessionManagementService Interface
Provides methods and properties for managing user sessions in the context of an OpenID Connect or OAuth 2.0 authorization server. This interface enables the implementation of session management features, such as creating session cookies, generating session state values and processing check session requests.
public interface ISessionManagementService
Derived
↳ SessionManagementService
Properties
ISessionManagementService.Enabled Property
Gets a value indicating whether session management is enabled and available for use in the authorization server.
When true, session management features are active and can be utilized to track and manage user sessions.
bool Enabled { get; }
Property Value
Methods
ISessionManagementService.GetCheckSessionResponseAsync() Method
Asynchronously retrieves the response for a session check operation. This method is called to process check session requests, allowing the client to query the current state of the user's session and detect any changes.
System.Threading.Tasks.Task<Abblix.Oidc.Server.Endpoints.CheckSession.Interfaces.CheckSessionResponse> GetCheckSessionResponseAsync();
Returns
System.Threading.Tasks.Task<CheckSessionResponse>
A System.Threading.Tasks.Task representing the asynchronous operation, yielding a CheckSessionResponse object that
contains the necessary information for the client to evaluate the session state.
ISessionManagementService.GetSessionCookie() Method
Retrieves the session cookie that is used for managing the user's session. This cookie can be used to persist session information across browser requests and to facilitate session management operations.
Abblix.Oidc.Server.Common.Cookie GetSessionCookie();
Returns
Cookie
A Cookie object configured for session management, containing details such as the cookie name,
value, path, and security settings.
ISessionManagementService.GetSessionState(AuthorizationRequest, string) Method
Generates a session state string that represents the current state of the user's session. This string can be used to validate the session's integrity and to detect session changes or logout events in a front-channel logout scenario.
string GetSessionState(Abblix.Oidc.Server.Model.AuthorizationRequest request, string sessionId);
Parameters
request AuthorizationRequest
The authorization request context, which may contain parameters influencing the session state generation.
sessionId System.String
A unique identifier for the user's session. This ID is used as part of the session state generation process.
Returns
System.String
A session state string that represents the hashed state of the session, including the session ID and other relevant factors.