fix: fix verify types
This commit is contained in:
parent
94266dfa8f
commit
f4886af272
@ -1,7 +1,7 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common'
|
import { Inject, Injectable } from '@nestjs/common'
|
||||||
|
|
||||||
import { PASSPORT_OPTIONS } from './constants'
|
import { PASSPORT_OPTIONS } from './constants'
|
||||||
import { PassportOptions } from './interfaces'
|
import { PassportOptions, VerifyResult } from './interfaces'
|
||||||
import {
|
import {
|
||||||
base64UrlDecode,
|
base64UrlDecode,
|
||||||
base64UrlEncode,
|
base64UrlEncode,
|
||||||
@ -47,7 +47,7 @@ export class PassportService {
|
|||||||
return [userPart, iatPart, extPart, hmac].join(PassportService.EXTERNAL_SEP)
|
return [userPart, iatPart, extPart, hmac].join(PassportService.EXTERNAL_SEP)
|
||||||
}
|
}
|
||||||
|
|
||||||
public verify(token: string) {
|
public verify(token: string): VerifyResult {
|
||||||
const parts = token.split(PassportService.EXTERNAL_SEP)
|
const parts = token.split(PassportService.EXTERNAL_SEP)
|
||||||
|
|
||||||
if (parts.length !== 4) {
|
if (parts.length !== 4) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user