@nathapp/nestjs-auth 1.0.0-rc.12 → 1.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,6 +16,7 @@ export declare abstract class JwtStrategyProvider implements StrategyProvider {
|
|
|
16
16
|
sign(payload: string | object | Buffer): string;
|
|
17
17
|
verify(token: string, verifyOption?: jwt.VerifyOptions): string | object;
|
|
18
18
|
abstract validate(req: Request, payload: any): IPrincipal | Promise<IPrincipal>;
|
|
19
|
+
abstract validate<T>(req: Request, payload: any): T | Promise<T>;
|
|
19
20
|
}
|
|
20
21
|
export declare class DefaultJwtStrategyProvider extends JwtStrategyProvider {
|
|
21
22
|
private readonly authProvider;
|
|
@@ -15,6 +15,7 @@ export interface JwtNestJsOptions {
|
|
|
15
15
|
export declare type JwtOptions = JwtNestJsOptions & jOption;
|
|
16
16
|
export interface StrategyProvider {
|
|
17
17
|
validate(req: Request, payload: any): IPrincipal | Promise<IPrincipal>;
|
|
18
|
+
validate<T>(req: Request, payload: any): T | Promise<T>;
|
|
18
19
|
sign(payload: string | object | Buffer): string;
|
|
19
20
|
verify(token: string, verifyOption?: jwt.VerifyOptions): object | string;
|
|
20
21
|
}
|