@creator.co/module-identity-client - v1.1.11
    Preparing search index...

    Manages URLs and provides methods for handling URL parameters and redirection.

    Index

    Constructors

    • Constructor for creating an instance of a class.

      Parameters

      • api: Api<any>

        The API object to be used.

      • persistentSession: default

        The persistent session object.

      Returns default

      None

    Methods

    • Deletes a parameter from the query string of the current URL.

      Parameters

      • paramName: string

        The name of the parameter to delete.

      Returns void

      None

    • Retrieves the callback URL parameter from the URL query parameters.

      Returns any

      The callback URL parameter value.

    • Returns the current URL of the page.

      Parameters

      • OptionalnoProtocol: boolean

        If true, the protocol (http/https) will be excluded from the URL.

      Returns string

      The current URL of the page, with or without the protocol based on the 'noProtocol' parameter.

    • Retrieves and decodes the extra context parameter from the URL query parameters.

      Returns null

      The decoded value of the extra context parameter, or null if not found or unable to decode.

    • Retrieves a parameter value from the URL query string by name.

      Parameters

      • paramName: string

        The name of the parameter to retrieve.

      • Optionalreplace: boolean

        Whether to replace '#' with '?' in the URL before parsing.

      • Optionalbase64Decode: boolean

        Whether to decode the parameter value from base64.

      Returns any

      The value of the parameter if found, null otherwise.

    • Asynchronously generates a redirect URL based on the provided parameters.

      Parameters

      • authDomain: string

        The domain for the redirect URL.

      • authPath: string

        The path for the redirect URL.

      • OptionaloptUsr: string

        Optional user email.

      • OptionaloptCBURL: string

        Optional client callback URL.

      • OptionaloptContext: any

        Optional context information.

      • OptionalforceNoCallback: boolean

        Flag to force no client callback URL.

      Returns Promise<string>

      A promise that resolves to the generated redirect URL.

    • Retrieves the user email parameter from the URL query parameters.

      Returns any

      The user email parameter value from the URL query parameters.

    • Check if a parameter with the given name exists and has a non-empty value.

      Parameters

      • paramName: string

        The name of the parameter to check.

      Returns boolean

      True if the parameter exists and has a non-empty value, false otherwise.

    • Asynchronously loads the federation state by normalizing the federation state query.

      Returns Promise<void>

      None

    • Redirects back to a specified callback URL, with an optional user ID and single sign-on inclusion. If includeSSO is true and userId is provided, the single sign-on information is appended to the callback URL.

      Parameters

      • callbackURL: string

        The URL to redirect back to.

      • OptionaluserId: string

        The user ID to include in the redirect URL.

      • OptionalincludeSSO: boolean

        A flag indicating whether to include single sign-on information.

      Returns Promise<void>

      None

    • Redirects the request to the specified authentication domain and path with optional parameters.

      Parameters

      • authDomain: string

        The authentication domain to redirect to.

      • authPath: string

        The authentication path to redirect to.

      • OptionaloptUsr: string

        Optional user email.

      • OptionaloptCBURL: string

        Optional client callback URL.

      • OptionaloptContext: any

        Optional extra context to encode and pass in the URL.

      • OptionalforceNoCallback: boolean

        Force no client callback URL.

      Returns Promise<void>

      None

    • Redirects the user to a new URL constructed from the given domain and parameters.

      Parameters

      • domain: string

        The domain to redirect to.

      • params: any

        The parameters to include in the URL.

      Returns void

      None

    • Sets a parameter with a given value in the URL query string.

      Parameters

      • paramName: string

        The name of the parameter to set.

      • value: string

        The value to set for the parameter.

      Returns void

      None

    • Sets the URL of the current window to the specified URL if not running in a Node.js environment.

      Parameters

      • _url: string

        The URL to set as the new location.

      Returns void

      None