@antelopejs/auth-jwt
Version:
Authentication and authorization module that implements the Auth interface of antelopejs with JWT
11 lines (10 loc) • 625 B
TypeScript
import { SignOptions, VerifyOptions } from 'jsonwebtoken';
import { AuthSource, AuthVerifier, AuthValidator } from '@ajs.local/auth/dev';
export declare const Verify: (data?: string, options?: VerifyOptions) => Promise<any>;
export declare const Sign: (data: any, options?: SignOptions) => Promise<string>;
export declare const AttachAuthDecorator: (target: any, key: PropertyKey | undefined, index: number | PropertyDescriptor | undefined, callbacks: {
source?: AuthSource;
authenticator?: AuthVerifier;
authenticatorOptions?: VerifyOptions;
validator?: AuthValidator;
}, validator?: AuthValidator) => void;