oidc-caep-risc-nodejs
    Preparing search index...

    Class RelyingParty

    A confidential OpenID Connect client. Build it with RelyingParty.fromFile or RelyingParty.create; both load the provider's metadata before returning.

    Index

    The provider's metadata, loaded by RelyingParty.create.

    • A valid access token for a session RelyingParty.complete cached: the cached one while it has more than 30 seconds left, otherwise one from the refresh token (with a DPoP proof when DPoP is in use), which replaces the cached tokens. A session that is not cached, or whose refresh fails, is refused; a failed refresh also removes the session.

      Parameters

      • session: string

      Returns Promise<AccessToken>

    • A DPoP proof for one request, for an application that makes the call itself. accessToken adds ath. Throws when DPoP is not in use.

      Parameters

      • method: string
      • url: string
      • OptionalaccessToken: string

      Returns Promise<string>

    • The RP-Initiated Logout URL, or undefined when the provider has no end-session endpoint. Ending the provider's session signs every account in this browser out of it; end one local session without redirecting there.

      Parameters

      • options: {
            idToken?: string;
            logoutHint?: string;
            postLogoutRedirectUri?: string;
            state?: string;
        } = {}

      Returns string | undefined

    • What a SignalsReceiver sends its calls with (its request option): each call carries a client-credentials token for scope, as a DPoP-bound token with a proof when DPoP is in use. A 401 that is not a nonce challenge drops the cached token, so the next call gets a new one.

      Parameters

      • scope: string = 'ssf.manage'
      • tls: TlsOptions = ...

      Returns (
          method: string,
          url: string,
          init: { body?: string; headers?: Record<string, string> },
      ) => Promise<HttpAnswer>

    • Calls UserInfo with the access token and checks that sub is expectedSub. tokenType is how the token is presented; the default is DPoP when DPoP is in use, otherwise Bearer.

      Parameters

      • accessToken: string
      • expectedSub: string
      • options: { tokenType?: string } = {}

      Returns Promise<Record<string, unknown>>