Class: StateMiddleware<S, T>
api-oauth/StateMiddleware.StateMiddleware
Type parameters
Name | Type |
---|---|
S | extends Record <string , any > = {} |
T | extends Record <string , any > = {} |
Hierarchy
StateMiddleware
↳
AuthAuthorizeExtractMiddleware
↳
OAuthAuthorizeExtractMiddleware
↳
OAuthAuthorizeRedirectMiddleware
↳
OAuthAuthorizeValidateMiddleware
↳
OAuthErrorRedirectMiddleware
↳
OAuthTokenAuthorizationCodeMiddleware
Implements
NestMiddleware
Constructors
constructor
• new StateMiddleware<S
, T
>()
Type parameters
Name | Type |
---|---|
S | extends Record <string , any > = {} |
T | extends Record <string , any > = {} |
Methods
appendState
▸ Protected
appendState(res
, appendedState
): void
Parameters
Name | Type |
---|---|
res | Response <any , Record <string , any >> |
appendedState | Partial <T > & { error? : any } | { error? : any } |
Returns
void
Defined in
gropius-login-service/backend/src/api-oauth/StateMiddleware.ts:42
use
▸ use(req
, res
, next
): Promise
<void
>
Parameters
Name | Type |
---|---|
req | Request <ParamsDictionary , any , any , ParsedQs , Record <string , any >> |
res | Response <any , Record <string , any >> |
next | (error? : any ) => any |
Returns
Promise
<void
>
Implementation of
NestMiddleware.use
Defined in
gropius-login-service/backend/src/api-oauth/StateMiddleware.ts:8
useWithError
▸ Protected
useWithError(req
, res
, state
, error
, next
): void
Overwrite this to handle errors
Parameters
Name | Type |
---|---|
req | Request <ParamsDictionary , any , any , ParsedQs , Record <string , any >> |
res | Response <any , Record <string , any >> |
state | S & { error? : any } |
error | any |
next | (error? : any ) => void |
Returns
void
Defined in
gropius-login-service/backend/src/api-oauth/StateMiddleware.ts:32
useWithState
▸ Protected
Abstract
useWithState(req
, res
, state
, next
): Promise
<any
>
Parameters
Name | Type |
---|---|
req | Request <ParamsDictionary , any , any , ParsedQs , Record <string , any >> |
res | Response <any , Record <string , any >> |
state | S & { error? : any } |
next | (error? : any ) => void |
Returns
Promise
<any
>
Defined in
gropius-login-service/backend/src/api-oauth/StateMiddleware.ts:22