Interface: OAuthVerifyOptions
Defined in: http-server-oauth/src/index.ts:140
Options for oauthVerify. Supply either cognitoUserPool (uses
CognitoJwtVerifier from @ttoss/auth-core) or a custom verifyToken.
Properties
cognitoUserPool?
optionalcognitoUserPool?:CognitoUserPoolConfig
Defined in: http-server-oauth/src/index.ts:142
Amazon Cognito user pool config; the middleware builds a verifier from it.
publicMethods?
optionalpublicMethods?:string[]
Defined in: http-server-oauth/src/index.ts:157
JSON-RPC methods (read from body.method) that bypass verification, so a
client can reach them before authenticating. Defaults to none.
requiredScopes?
optionalrequiredScopes?:string[]
Defined in: http-server-oauth/src/index.ts:152
Scopes that must all be present on the token. Missing any → 403. Scopes
are read from a space-separated scope claim.
resourceMetadataUrl?
optionalresourceMetadataUrl?:string
Defined in: http-server-oauth/src/index.ts:162
When set, a 401 responds with WWW-Authenticate: Bearer resource_metadata="<url>" (RFC 9728) instead of a bare Bearer.
verifyToken?
optionalverifyToken?: (token) =>Promise<unknown>
Defined in: http-server-oauth/src/index.ts:147
Custom token verifier for non-Cognito providers (Auth0, Keycloak, your own JWTs, opaque tokens). Resolve with the verified payload, or throw to reject.
Parameters
| Parameter | Type |
|---|---|
token | string |
Returns
Promise<unknown>