MonoCloud Authentication SDK
    Preparing search index...
    Index
    • Handles Back-Channel Logout notifications from the identity provider.

      Validates the Logout Token and triggers the onBackChannelLogout callback defined in options.

      Parameters

      Returns Promise<any>

      A promise that resolves when the logout notification has been processed.

    • 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.

      Parameters

      Returns Promise<any>

      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.

      Parameters

      Returns Promise<void>

      This does not perform federated sign-out. For identity provider sign-out, use signOut handler.

    • Returns a copy of the current client configuration options.

      Returns MonoCloudOptionsBase

      A copy of the initialized configuration.

    • Checks if the current request has an active and authenticated session.

      Parameters

      Returns Promise<boolean>

      true if a valid session with user data exists, false otherwise.

    • Checks if the current session user belongs to the specified groups.

      Parameters

      • request: IMonoCloudCookieRequest

        MonoCloud cookie request object.

      • response: IMonoCloudCookieResponse

        MonoCloud cookie response object.

      • groups: string[]

        List of group names or IDs to check.

      • OptionalgroupsClaim: string

        Optional claim name that holds groups. Defaults to the configured groupsClaim option ("groups" unless overridden).

      • OptionalmatchAll: boolean

        If true, requires membership in all groups; otherwise any one group is sufficient.

      Returns Promise<boolean>

      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.

      Parameters

      Returns Promise<any>

      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.

      Parameters

      Returns Promise<any>

      A promise that resolves when the sign-out redirection is initiated.

    • Retrieves user information, optionally refetching fresh data from the UserInfo endpoint.

      Parameters

      Returns Promise<any>

      A promise that resolves with the user information sent as a JSON response.

      If refresh is true, the session is updated with fresh claims from the identity provider.