MonoCloud Authentication SDK
    Preparing search index...

    Class MonoCloudOidcClientBase

    Hierarchy

    Index
    fetcher?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Custom fetch implementation used for making HTTP requests. Falls back to the global fetch if not provided.

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    jwks?: Jwks

    Cached JSON Web Key Set retrieved from the issuer's JWKS endpoint.

    jwksCacheDuration: number = 300

    Duration (in seconds) for which the JWKS is cached. Defaults to 300 (5 minutes).

    jwksCacheExpiry: number = 0

    Timestamp (in seconds) when the cached JWKS expires.

    jwksResolver?: () => Jwks | Promise<Jwks>

    Optional custom resolver for the JSON Web Key Set, used instead of the JWKS request.

    metadata?: IssuerMetadata

    Cached issuer metadata retrieved from the OpenID Connect discovery endpoint.

    metadataCacheDuration: number = 300

    Duration (in seconds) for which the metadata is cached. Defaults to 300 (5 minutes).

    metadataCacheExpiry: number = 0

    Timestamp (in seconds) when the cached metadata expires.

    metadataResolver?: () => IssuerMetadata | Promise<IssuerMetadata>

    Optional custom resolver for the issuer metadata, used instead of the discovery request.

    tenantDomain: string

    The normalized tenant domain URL used as the base for discovery endpoints.

    trustStoreId?: string

    Identifier of the trust store whose mTLS endpoint aliases should be used, if any.

    usesMtlsEndpoints: boolean

    Whether the configured client authentication method uses mutual TLS, and therefore requires the mTLS endpoint aliases from the issuer metadata.

    • Fetches the JSON Web Keys used to sign the ID token. The JWKS is cached for 5 minutes by default.

      Parameters

      • forceRefresh: boolean = false

        If true, bypasses the cache and fetches fresh set of JWKS from the server.

      Returns Promise<Jwks>

      The JSON Web Key Set containing the public keys for token verification.

      MonoCloudHttpError - Thrown if there is a network error during the request or unexpected status code during the request or a serialization error while processing the response.

    • Fetches the authorization server metadata from the .well-known endpoint. The metadata is cached for 5 minutes by default.

      Parameters

      • forceRefresh: boolean = false

        If true, bypasses the cache and fetches fresh metadata from the server.

      Returns Promise<IssuerMetadata>

      The issuer metadata for the tenant, retrieved from the OpenID Connect discovery endpoint.

      MonoCloudHttpError - Thrown if there is a network error during the request or unexpected status code during the request or a serialization error while processing the response.