Abstract Class: BaseOAuthTokenRoute<C, A, R>
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:27
Handles the OAuth 2.0 /token endpoint (RFC 6749 §3.2), dispatching by grant_type.
authorization_code, refresh_token, and client_credentials are implemented.
Extended by
Type Parameters
C
C extends Client
A
A extends AuthorizationCode
R
R extends OAuthRefreshToken
Constructors
Constructor
new BaseOAuthTokenRoute<
C,A,R>():BaseOAuthTokenRoute<C,A,R>
Returns
BaseOAuthTokenRoute<C, A, R>
Properties
authorizationCodeClass
abstractprotectedauthorizationCodeClass:any
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:28
authorizationCodeRepo?
protectedoptionalauthorizationCodeRepo?:RepoUtils<A>
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:30
clientAuthUtils?
protectedoptionalclientAuthUtils?:ClientAuthUtils
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:32
clientClass
abstractprotectedclientClass:any
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:34
clientRepo?
protectedoptionalclientRepo?:RepoUtils<C>
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:36
oauthTokenUtils?
protectedoptionaloauthTokenUtils?:OAuthTokenUtils
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:38
rateLimiter?
protectedoptionalrateLimiter?:RateLimiter
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:41
refreshTokenClass
abstractprotectedrefreshTokenClass:any
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:43
refreshTokenRepo?
protectedoptionalrefreshTokenRepo?:RepoUtils<R>
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:45
signingKeyClass
abstractprotectedsigningKeyClass:any
Defined in: auth/src/routes/BaseOAuthTokenRoute.ts:47
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>