Methods
cleanTokenFromCookie
- cleanTokenFromCookie(): Promise<void>
-
Returns Promise<void>
generateTokenForUser
- generateTokenForUser(user: User, payload?: string | object | Buffer): Promise<string>
-
Parameters
-
-
payload: string | object | Buffer = {}
Returns Promise<string>
getJwtSignSecret
- getJwtSignSecret(): Secret
-
Returns Secret
getJwtVerifySecret
- getJwtVerifySecret(): Secret
-
Returns Secret
getTokenAge
- getTokenAge(): number
-
Returns number
getTokenKey
- getTokenKey(): string
-
Returns string
getUserFromToken
- getUserFromToken(token: string): Promise<undefined | User>
-
Returns Promise<undefined | User>
verifyToken
- verifyToken(token: string): Promise<JwtPayload>
-
Returns Promise<JwtPayload>