AbstractProtectedconstructorThe credential provider configuration options.
OptionalopenId: OpenIdConfigurationAn Open ID configuration used to configure this credential provider.
Protected Optional_OpenID Provider metadata used to configure clients. Docs: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
Optional ReadonlyauthorizationThe authorization endpoint is used to interact with the resource owner and obtain an authorization grant. The authorization server MUST first verify the identity of the resource owner. Source: https://www.rfc-editor.org/rfc/rfc6749#section-3.1
ReadonlyclientThe client identifier issued to the client during the registration process.
Protected ReadonlyclientThe client secret issued by the OAuth provider. Some credential providers do not require a client secret.
ReadonlydiscoveryA fully qualified URL for the OpenId Provider Metadata.
Source: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
Optional ReadonlyendURL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. This URL MUST use the https scheme and MAY contain port, path, and query parameter components. SOURCE: https://openid.net/specs/openid-connect-rpinitiated-1_0.html#OPMetadata
ReadonlyscopeThe scope to request during the authorization flow. As defined per the OAuth Specification: "...a list of space-delimited, case-sensitive strings. The strings are defined by the authorization server. If the value contains multiple space-delimited strings, their order does not matter, and each string adds an additional access range to the requested scope." Source: https://www.rfc-editor.org/rfc/rfc6749#section-3.3.
Optional ReadonlytokenThe token endpoint is used by the client to obtain an access token by presenting its authorization grant or refresh token. The token endpoint is used with every authorization grant except for the implicit grant type (deprecated) since an access token is issued directly. Source: https://www.rfc-editor.org/rfc/rfc6749#section-3.2
Optional ReadonlytokenSpecifies the authentication method to be used at the OAuth 2.0 token endpoint.
This property indicates how the client credentials should be transmitted when exchanging an authorization code for an access token. The value can be one of the following:
TOKEN_ENDPOINT_AUTH_METHOD.BASIC: Client credentials are included in the HTTP Authorization
header using Basic authentication (base64 encoded clientId:clientSecret).TOKEN_ENDPOINT_AUTH_METHOD.POST: Client credentials are sent as form parameters in the request body.If this property is undefined, the authentication method defaults to TOKEN_ENDPOINT_AUTH_METHOD.POST.
ReadonlytokenThe location where the token should be used.
ReadonlytokenThe name of the token location property, usually a header name or querystring key.
ReadonlytokenThe token value may have a prefix, such as 'Basic' or 'Bearer'
AbstractcloneOptionaloptions: unknownProtectedcreateCreates the configuration object for an OAuth2 token request.
This function returns a RequestInit object that can be used with the fetch API to perform a token request. It builds the request using a POST method and the application/x-www-form-urlencoded content type. Depending on the authentication method (BASIC or POST) and the grant type (AUTHORIZATION_CODE or REFRESH_TOKEN), the appropriate headers and body parameters are conditionally included.
The options for the token request.
The request configuration object, including method, headers, and body.
AbstractexpireIf the OAuth server reports the token is broken even though its "expiresIn" time has not yet arrived,
then call this function to force the next resolve() call to refresh the token
AbstractgetThis function should only be implemented when extending this class
ProtectedgetRetrieves the token endpoint URL for the OpenID provider. It first checks if the tokenEndpoint
property is already set and returns it if available. If not, it retrieves the OpenID configuration
via the openId() method, obtains the token endpoint from the configuration, and converts it to a string.
A promise that resolves to the token endpoint URL as a string.
AbstractresolveThis function should only be implemented when extending this class
StaticfromOptional_data: unknownStaticfromOptional_prefix: string
Constructs the base of the credential providers. Only use this class to inherit the base methods and properties.