Compare commits
2 Commits
94266dfa8f
...
8b69667b57
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b69667b57 | |||
| f4886af272 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@teacinema/passport",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "TeaCinema authentication library",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Inject, Injectable } from '@nestjs/common'
|
||||
|
||||
import { PASSPORT_OPTIONS } from './constants'
|
||||
import { PassportOptions } from './interfaces'
|
||||
import { PassportOptions, VerifyResult } from './interfaces'
|
||||
import {
|
||||
base64UrlDecode,
|
||||
base64UrlEncode,
|
||||
@ -47,7 +47,7 @@ export class PassportService {
|
||||
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)
|
||||
|
||||
if (parts.length !== 4) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user