apps/api: move jwt types to src/types
This commit is contained in:
parent
20b1aeda5c
commit
becce3218d
@ -8,8 +8,8 @@ import * as bcrypt from 'bcrypt';
|
||||
import { Model } from 'mongoose';
|
||||
import { omit } from 'radash';
|
||||
import type { Credentials } from 'src/dto/credentials';
|
||||
import type { DecodedToken, TokenPayload } from 'src/ldap/types/jwt';
|
||||
import { Account } from 'src/schemas/account.schema';
|
||||
import type { DecodedToken, TokenPayload } from 'src/types/jwt';
|
||||
import { generatePassword } from 'src/utils/password';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { DecodedToken } from './ldap/types/jwt';
|
||||
import type { DecodedToken } from './types/jwt';
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { JwtService } from '@nestjs/jwt';
|
||||
import { omit } from 'radash';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { DecodedToken, TokenPayload } from './types/jwt';
|
||||
import type { DecodedToken, TokenPayload } from '../types/jwt';
|
||||
import { CACHE_MANAGER } from '@nestjs/cache-manager';
|
||||
import { Inject, Injectable, UnauthorizedException } from '@nestjs/common';
|
||||
import type { JwtSignOptions } from '@nestjs/jwt';
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
import type { JwtSignOptions } from '@nestjs/jwt';
|
||||
|
||||
export type TokenPayload = {
|
||||
[key: string]: unknown;
|
||||
username: string;
|
||||
};
|
||||
|
||||
export type DecodedToken = {
|
||||
aud?: string;
|
||||
aud?: JwtSignOptions['audience'];
|
||||
exp: number;
|
||||
iat: number;
|
||||
} & TokenPayload;
|
||||
Loading…
x
Reference in New Issue
Block a user