@theoptimalpartner/jwt-auth-validator
Version:
JWT token validation package with offline JWKS validation and Redis-based token revocation support
25 lines • 901 B
TypeScript
import type { JWTPayload } from "jose";
import { JWKSConfig, JWKSStats } from './types.js';
export declare class JWKSService {
private keyCache;
private remoteJWKSet;
private config;
constructor();
initialize(config: JWKSConfig): void;
static createCognitoConfig(region: string, userPoolId: string, clientId?: string, clientSecret?: string): JWKSConfig;
getRemoteJWKSet(): any;
diagnoseTokenIssues(token: string): {
config: any;
payload: any;
issues: string[];
};
validateTokenWithJWKS(token: string): Promise<JWTPayload>;
validateCognitoToken(token: string): Promise<JWTPayload>;
invalidateCache(): void;
getCacheStats(): JWKSStats;
getClientSecret(): string | undefined;
hasClientSecret(): boolean;
calculateSecretHash(identifier: string): string;
reset(): void;
}
//# sourceMappingURL=jwks-service.d.ts.map