Compare commits
2 Commits
db703df2cb
...
c275367d86
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c275367d86 | ||
|
|
46b0a79a19 |
@@ -1 +1,6 @@
|
||||
export const PASSPORT_OPTIONS = Symbol('PassportOptions')
|
||||
|
||||
export const TOKEN_TYPES = {
|
||||
AUTH: 'PassportToken/v1',
|
||||
TEMP_2FA: 'PassportToken/v1/2fa'
|
||||
} as const
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './interfaces'
|
||||
export * from './passport.module'
|
||||
export * from './passport.service'
|
||||
export * from './constants'
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
import { Inject, Injectable } from '@nestjs/common'
|
||||
import { createHmac, randomUUID } from 'crypto'
|
||||
|
||||
import { PASSPORT_OPTIONS } from './constants'
|
||||
import { PASSPORT_OPTIONS, TOKEN_TYPES } from './constants'
|
||||
import { PassportOptions } from './interfaces'
|
||||
import { base64UrlDecode, base64UrlEncode, constantTimeEqual } from './utils'
|
||||
|
||||
const TOKEN_TYPES = {
|
||||
AUTH: 'PassportToken/v1',
|
||||
TEMP_2FA: 'PassportToken/v1/2fa'
|
||||
} as const
|
||||
|
||||
type TokenType = (typeof TOKEN_TYPES)[keyof typeof TOKEN_TYPES]
|
||||
|
||||
@Injectable()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lendry-erp/passport",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "Библиотека для аутентификации.",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user