Function: getCantonAuthorizationServerMetadata()
getCantonAuthorizationServerMetadata(
authorizationServerURL:string,options?: {allowInsecureRequests?:boolean;fetch?: (input:string|URL|Request,init?:RequestInit) =>Promise<Response>;signal?:AbortSignal; }):Promise<AuthorizationServerMetadata>
Defined in: canton/authentication/metadata.ts:72
Fetch OAuth 2.0 Authorization Server Metadata from the well-known endpoint.
Uses oauth4webapi.discoveryRequest + processDiscoveryResponse (RFC 8414),
which validates the issuer and parses the metadata. The result is mapped to
our camelCase AuthorizationServerMetadata interface.
Parameters
| Parameter | Type | Description |
|---|---|---|
authorizationServerURL | string | Base URL of the authorization server (trailing / stripped). |
options? | { allowInsecureRequests?: boolean; fetch?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>; signal?: AbortSignal; } | Optional fetch override and abort signal. |
options.allowInsecureRequests? | boolean | - |
options.fetch? | (input: string | URL | Request, init?: RequestInit) => Promise<Response> | - |
options.signal? | AbortSignal | - |
Returns
Promise<AuthorizationServerMetadata>
The parsed authorization server metadata.
Throws
CCIPError with CCIPErrorCode.CANTON_AUTH_ERROR on discovery failure.