nest-azure-ad-jwt-validator
Version:
Nest Azure Active Directory JWT Token Validator
18 lines (17 loc) • 763 B
TypeScript
import { AzureAdUser } from '../models';
import { HttpService } from '@nestjs/axios';
import { NestAzureAdJwtValidatorModuleOptions } from '../module-config';
export declare class AzureTokenValidationService {
private readonly httpService;
private readonly options;
private readonly logger;
constructor(httpService: HttpService, options: NestAzureAdJwtValidatorModuleOptions);
isTokenValid(accessToken: string): Promise<[boolean, AzureAdUser, boolean]>;
getAzureUserFromToken(accessToken: string): Promise<AzureAdUser>;
private extractUserFromToken;
extractRolesFromToken(accessToken: string): Promise<AzureAdUser>;
private getAzureKeys;
private verifyToken;
private getTokenHeader;
private validateServiceToken;
}