vona-module-a-jwt 5.0.19 → 5.0.20
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.
package/dist/bean/bean.jwt.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IAuthenticateStrategyState } from 'vona-module-a-auth';
|
|
2
|
+
import type { IJwtClientRecord, IJwtSignOptions, IJwtToken, IPayloadData } from '../types/jwt.ts';
|
|
2
3
|
import { BeanBase } from 'vona';
|
|
3
4
|
import { ServiceJwtClient } from '../service/jwtClient.ts';
|
|
4
5
|
export declare class BeanJwt extends BeanBase {
|
|
5
6
|
get(clientName?: keyof IJwtClientRecord): ServiceJwtClient;
|
|
6
|
-
create(payloadData:
|
|
7
|
-
createTempAuthToken(payloadData:
|
|
8
|
-
createOauthAuthToken(payloadData:
|
|
9
|
-
createOauthState(payloadData:
|
|
10
|
-
createOauthCode(payloadData:
|
|
7
|
+
create(payloadData: IPayloadData, options?: IJwtSignOptions): Promise<IJwtToken>;
|
|
8
|
+
createTempAuthToken(payloadData: IPayloadData, options?: IJwtSignOptions): Promise<string>;
|
|
9
|
+
createOauthAuthToken(payloadData: IPayloadData, options?: IJwtSignOptions): Promise<string>;
|
|
10
|
+
createOauthState(payloadData: IAuthenticateStrategyState, options?: IJwtSignOptions): Promise<string>;
|
|
11
|
+
createOauthCode(payloadData: IPayloadData, options?: IJwtSignOptions): Promise<string>;
|
|
11
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IJwtClientRecord, IJwtSignOptions, IJwtVerifyOptions,
|
|
1
|
+
import type { IJwtClientRecord, IJwtSignOptions, IJwtVerifyOptions, IPayloadData } from '../types/jwt.ts';
|
|
2
2
|
import jwt from 'jsonwebtoken';
|
|
3
3
|
import { BeanBase } from 'vona';
|
|
4
4
|
export declare class ServiceJwtClient extends BeanBase {
|
|
@@ -11,7 +11,7 @@ export declare class ServiceJwtClient extends BeanBase {
|
|
|
11
11
|
private get fieldClient();
|
|
12
12
|
private get fieldPath();
|
|
13
13
|
private get fieldData();
|
|
14
|
-
sign(payloadData:
|
|
15
|
-
verify(token?: string, options?: IJwtVerifyOptions): Promise<
|
|
14
|
+
sign(payloadData: IPayloadData, options?: IJwtSignOptions): Promise<string>;
|
|
15
|
+
verify(token?: string, options?: IJwtVerifyOptions): Promise<IPayloadData | undefined>;
|
|
16
16
|
_checkVerifyPath(pathTarget: string | string[] | undefined, pathReal: string | undefined): boolean;
|
|
17
17
|
}
|
package/dist/types/jwt.d.ts
CHANGED