@elysiajs/jwt 1.2.0 → 1.3.0
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/bun.lock +514 -0
- package/dist/cjs/index.d.ts +11 -8
- package/dist/cjs/index.js +255 -123
- package/dist/index.d.ts +11 -8
- package/dist/index.mjs +255 -123
- package/package.json +3 -3
package/dist/cjs/index.d.ts
CHANGED
|
@@ -53,21 +53,22 @@ export interface JWTOption<Name extends string | undefined = 'jwt', Schema exten
|
|
|
53
53
|
exp?: string | number;
|
|
54
54
|
}
|
|
55
55
|
export declare const jwt: <const Name extends string = "jwt", const Schema extends TSchema | undefined = undefined>({ name, secret, alg, crit, schema, nbf, exp, ...payload }: JWTOption<Name, Schema>) => Elysia<"", {
|
|
56
|
-
decorator:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}; } extends infer T
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}; }[
|
|
56
|
+
decorator: { [name in Name extends string ? Name : "jwt"]: {
|
|
57
|
+
sign(morePayload: UnwrapSchema<Schema, Record<string, string | number>> & JWTPayloadSpec): Promise<string>;
|
|
58
|
+
verify(jwt?: string): Promise<(UnwrapSchema<Schema, Record<string, string | number>> & JWTPayloadSpec) | false>;
|
|
59
|
+
}; } extends infer T ? { [K in keyof T]: { [name in Name extends string ? Name : "jwt"]: {
|
|
60
|
+
sign(morePayload: UnwrapSchema<Schema, Record<string, string | number>> & JWTPayloadSpec): Promise<string>;
|
|
61
|
+
verify(jwt?: string): Promise<(UnwrapSchema<Schema, Record<string, string | number>> & JWTPayloadSpec) | false>;
|
|
62
|
+
}; }[K]; } : never;
|
|
63
63
|
store: {};
|
|
64
64
|
derive: {};
|
|
65
65
|
resolve: {};
|
|
66
66
|
}, {
|
|
67
|
-
typebox:
|
|
67
|
+
typebox: {};
|
|
68
68
|
error: {};
|
|
69
69
|
}, {
|
|
70
70
|
schema: {};
|
|
71
|
+
standaloneSchema: {};
|
|
71
72
|
macro: {};
|
|
72
73
|
macroFn: {};
|
|
73
74
|
parser: {};
|
|
@@ -75,9 +76,11 @@ export declare const jwt: <const Name extends string = "jwt", const Schema exten
|
|
|
75
76
|
derive: {};
|
|
76
77
|
resolve: {};
|
|
77
78
|
schema: {};
|
|
79
|
+
standaloneSchema: {};
|
|
78
80
|
}, {
|
|
79
81
|
derive: {};
|
|
80
82
|
resolve: {};
|
|
81
83
|
schema: {};
|
|
84
|
+
standaloneSchema: {};
|
|
82
85
|
}>;
|
|
83
86
|
export default jwt;
|