Class: AuthJwtStrategy
Extends
- JwtStrategy<- this>
Constructors
new AuthJwtStrategy()
new AuthJwtStrategy(
settings,verifyTokenService,userLookupService):AuthJwtStrategy
Parameters
| Parameter | Type | 
|---|---|
| settings | Partial<AuthJwtSettingsInterface> | 
| verifyTokenService | VerifyTokenServiceInterface | 
| userLookupService | AuthJwtUserLookupServiceInterface | 
Returns
Overrides
Defined in
packages/nestjs-auth-jwt/src/auth-jwt.strategy.ts:30 (opens in a new tab)
Methods
authenticate()
authenticate(...
args):void
Performs authentication for the request. Note: Virtual function - re-implement in the strategy.
Parameters
| Parameter | Type | 
|---|---|
| ... args | [ Request<ParamsDictionary,any,any,ParsedQs,Record<string,any>>,any] | 
Returns
void
Inherited from
Defined in
packages/nestjs-jwt/dist/jwt.strategy.d.ts:8
error()
error(
err):void
Internal error while performing authentication.
Strategies should call this function when an internal error occurs during the process of performing authentication; for example, if the user directory is not available.
Parameters
| Parameter | Type | 
|---|---|
| err | Error | 
Returns
void
Api
public
Inherited from
Defined in
node_modules/@types/passport-strategy/index.d.ts:90
fail()
fail(challenge, status)
fail(
challenge,status):void
Fail authentication, with optional challenge and status, defaulting
to 401.
Strategies should call this function to fail an authentication attempt.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| challenge | any | (Can also be an object with 'message' and 'type' fields). | 
| status | number | - | 
Returns
void
Api
public
Inherited from
Defined in
node_modules/@types/passport-strategy/index.d.ts:54
fail(status)
fail(
status):void
Parameters
| Parameter | Type | 
|---|---|
| status | number | 
Returns
void
Inherited from
Defined in
node_modules/@types/passport-strategy/index.d.ts:55
pass()
pass():
void
Pass without making a success or fail decision.
Under most circumstances, Strategies should not need to call this function. It exists primarily to allow previous authentication state to be restored, for example from an HTTP session.
Returns
void
Api
public
Inherited from
Defined in
node_modules/@types/passport-strategy/index.d.ts:78
redirect()
redirect(
url,status?):void
Redirect to url with optional status, defaulting to 302.
Strategies should call this function to redirect the user (via their user agent) to a third-party website for authentication.
Parameters
| Parameter | Type | 
|---|---|
| url | string | 
| status? | number | 
Returns
void
Api
public
Inherited from
Defined in
node_modules/@types/passport-strategy/index.d.ts:67
success()
success(
user,info?):void
Authenticate user, with optional info.
Strategies should call this function to successfully authenticate a
user.  user should be an object supplied by the application after it
has been given an opportunity to verify credentials.  info is an
optional argument containing additional user information.  This is
useful for third-party authentication strategies to pass profile
details.
Parameters
| Parameter | Type | 
|---|---|
| user | any | 
| info? | any | 
Returns
void
Api
public
Inherited from
Defined in
node_modules/@types/passport-strategy/index.d.ts:42
validate()
validate(
payload,queryOptions?):Promise<ReferenceIdInterface<string>>
Validate the user based on payload sub
Parameters
| Parameter | Type | Description | 
|---|---|---|
| payload | AuthorizationPayloadInterface | The payload to validate | 
| queryOptions? | QueryOptionsInterface | - | 
Returns
Promise<ReferenceIdInterface<string>>
Defined in
packages/nestjs-auth-jwt/src/auth-jwt.strategy.ts:51 (opens in a new tab)