Skip to main content

Abstract Class: BaseOAuthTokenRouteSQL

Defined in: auth/src/routes/sql/BaseOAuthTokenRouteSQL.ts:8

Handles the OAuth 2.0 /token endpoint (RFC 6749 §3.2), dispatching by grant_type. authorization_code, refresh_token, and client_credentials are implemented.

Extends​

Constructors​

Constructor​

new BaseOAuthTokenRouteSQL(): BaseOAuthTokenRouteSQL

Returns​

BaseOAuthTokenRouteSQL

Inherited from​

BaseOAuthTokenRoute.constructor

Properties​

authorizationCodeClass​

protected authorizationCodeClass: any = AuthorizationCodeSQL

Defined in: auth/src/routes/sql/BaseOAuthTokenRouteSQL.ts:9

Overrides​

BaseOAuthTokenRoute.authorizationCodeClass


authorizationCodeRepo?​

protected optional authorizationCodeRepo?: RepoUtils<AuthorizationCodeSQL>

Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:30

Inherited from​

BaseOAuthTokenRoute.authorizationCodeRepo


clientAuthUtils?​

protected optional clientAuthUtils?: ClientAuthUtils

Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:32

Inherited from​

BaseOAuthTokenRoute.clientAuthUtils


clientClass​

protected clientClass: any = ClientSQL

Defined in: auth/src/routes/sql/BaseOAuthTokenRouteSQL.ts:10

Overrides​

BaseOAuthTokenRoute.clientClass


clientRepo?​

protected optional clientRepo?: RepoUtils<ClientSQL>

Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:36

Inherited from​

BaseOAuthTokenRoute.clientRepo


oauthTokenUtils?​

protected optional oauthTokenUtils?: OAuthTokenUtils

Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:38

Inherited from​

BaseOAuthTokenRoute.oauthTokenUtils


rateLimiter?​

protected optional rateLimiter?: RateLimiter

Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:41

Inherited from​

BaseOAuthTokenRoute.rateLimiter


refreshTokenClass​

protected refreshTokenClass: any = OAuthRefreshTokenSQL

Defined in: auth/src/routes/sql/BaseOAuthTokenRouteSQL.ts:11

Overrides​

BaseOAuthTokenRoute.refreshTokenClass


refreshTokenRepo?​

protected optional refreshTokenRepo?: RepoUtils<OAuthRefreshTokenSQL>

Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:45

Inherited from​

BaseOAuthTokenRoute.refreshTokenRepo


signingKeyClass​

protected signingKeyClass: any = SigningKeySQL

Defined in: auth/src/routes/sql/BaseOAuthTokenRouteSQL.ts:12

Overrides​

BaseOAuthTokenRoute.signingKeyClass

Methods​

token()​

token(req, res): Promise<any>

Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:344

Dispatches an incoming token request by grant_type. Always sets Cache-Control: no-store and Pragma: no-cache (RFC 6749 §5.1), and always responds with a 2xx/4xx JSON body directly (never throws past this point) so error responses use the RFC 6749 §5.2 shape rather than this library's usual ApiError envelope.

Parameters​

req​

HttpRequest

res​

HttpResponse

Returns​

Promise<any>

Inherited from​

BaseOAuthTokenRoute.token