OptionalpartialOptions: MonoCloudOptionsMonoCloud request object.
MonoCloud response object.
A promise that resolves when the logout notification has been processed.
MonoCloudValidationError If the logout token is missing or invalid.
Handles the OpenID callback after the user authenticates with MonoCloud.
Processes the authorization code, validates the state and nonce, exchanges the code for tokens, initializes the user session, and performs the final redirect to the application's return URL.
MonoCloud request object.
MonoCloud response object.
OptionalcallbackOptions: CallbackOptionsOptional configuration for the callback handler.
A promise that resolves when the callback processing and redirection are complete.
MonoCloudValidationError If the state is mismatched or tokens are invalid.
Destroys the local user session.
MonoCloud cookie request object.
MonoCloud cookie response object.
Returns a copy of the current client configuration options.
A copy of the initialized configuration.
Retrieves the current user's session data.
MonoCloud cookie request object.
MonoCloud cookie response object.
Session or undefined.
Retrieves active tokens (Access, ID, Refresh), performing a refresh if they are expired or missing.
MonoCloud cookie request object.
MonoCloud cookie response object.
Optionaloptions: GetTokensOptionsConfiguration for token retrieval (force refresh, specific scopes/resources).
Fetched tokens
MonoCloudValidationError If the session does not exist or tokens cannot be found/refreshed.
Checks if the current request has an active and authenticated session.
MonoCloud cookie request object.
MonoCloud cookie response object.
true if a valid session with user data exists, false otherwise.
Checks if the current session user belongs to the specified groups.
MonoCloud cookie request object.
MonoCloud cookie response object.
List of group names or IDs to check.
OptionalgroupsClaim: stringOptional claim name that holds groups. Defaults to "groups".
OptionalmatchAll: booleanIf true, requires membership in all groups; otherwise any one group is sufficient.
true if the user satisfies the group condition, false otherwise.
Initiates the sign-in flow by redirecting the user to the MonoCloud authorization endpoint.
This method handles scope and resource merging, state generation (nonce, state, PKCE), and Constructing the final authorization URL.
MonoCloud request object.
MonoCloud response object.
OptionalsignInOptions: SignInOptionsConfiguration to customize the sign-in behavior.
A promise that resolves when the callback processing and redirection are complete.
MonoCloudValidationError When validation of parameters or state fails.
Initiates the sign-out flow, destroying the local session and optionally performing federated sign-out.
MonoCloud request object.
MonoCloud response object.
OptionalsignOutOptions: SignOutOptionsConfiguration for post-logout behavior and federated sign-out.
A promise that resolves when the sign-out redirection is initiated.
Updates the current user's session with new data.
MonoCloud cookie request object.
MonoCloud cookie response object.
The updated session object to persist.
Retrieves user information, optionally refetching fresh data from the UserInfo endpoint.
MonoCloud request object.
MonoCloud response object.
OptionaluserinfoOptions: UserInfoOptionsConfiguration to control refetching and error handling.
A promise that resolves with the user information sent as a JSON response.
Handles Back-Channel Logout notifications from the identity provider.
Validates the Logout Token and triggers the
onBackChannelLogoutcallback defined in options.