Skip to main content

Interface: OAuthHandlers

Defined in: auth-core/src/oauthServerTypes.ts:431

The runner-agnostic OAuth server handlers returned by createOAuthHandlers.

Properties​

authorizationServerMetadata​

authorizationServerMetadata: () => OAuthResponse

Defined in: auth-core/src/oauthServerTypes.ts:435

RFC 8414 Authorization Server Metadata response.

Returns​

OAuthResponse


authorize​

authorize: (request) => Promise<OAuthResponse>

Defined in: auth-core/src/oauthServerTypes.ts:439

Handle a GET /authorize request.

Parameters​

ParameterType
requestOAuthRequest

Returns​

Promise<OAuthResponse>


paths​

paths: object

Defined in: auth-core/src/oauthServerTypes.ts:433

Resolved endpoint paths, for an adapter to mount routes on.

authorize​

authorize: string

register​

register: string

token​

token: string


protectedResourceMetadata​

protectedResourceMetadata: () => OAuthResponse | undefined

Defined in: auth-core/src/oauthServerTypes.ts:437

RFC 9728 Protected Resource Metadata response, or undefined if resource is unset.

Returns​

OAuthResponse | undefined


register​

register: (request) => Promise<OAuthResponse>

Defined in: auth-core/src/oauthServerTypes.ts:443

Handle a POST /register request (Dynamic Client Registration, RFC 7591).

Parameters​

ParameterType
requestOAuthRequest

Returns​

Promise<OAuthResponse>


token​

token: (request) => Promise<OAuthResponse>

Defined in: auth-core/src/oauthServerTypes.ts:441

Handle a POST /token request (authorization_code + refresh_token grants).

Parameters​

ParameterType
requestOAuthRequest

Returns​

Promise<OAuthResponse>