Compare commits

..

No commits in common. "8b69667b57ab55bbb9e9fe0daf8d23778a9b0fd6" and "94266dfa8f9a7e09ae4b54072579f13b0ad4cb01" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@teacinema/passport", "name": "@teacinema/passport",
"version": "1.0.1", "version": "1.0.0",
"description": "TeaCinema authentication library", "description": "TeaCinema authentication library",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",

View File

@ -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, VerifyResult } from './interfaces' import { PassportOptions } 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): VerifyResult { public verify(token: string) {
const parts = token.split(PassportService.EXTERNAL_SEP) const parts = token.split(PassportService.EXTERNAL_SEP)
if (parts.length !== 4) { if (parts.length !== 4) {