@persistica/flux-mesh 0.0.22 → 0.0.23
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/index.js +28 -28
- package/package.json +1 -1
- package/src/auth/auth.d.ts +8 -0
package/package.json
CHANGED
package/src/auth/auth.d.ts
CHANGED
|
@@ -19,6 +19,14 @@ export type TTokenPayloadJWT = string & {
|
|
|
19
19
|
* @returns { string } The signed JWT string
|
|
20
20
|
*/
|
|
21
21
|
export declare const generateToken: (payload: TTokenPayload, expiresIn?: number) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Normalizes the authority claim to the string form used throughout mesh.
|
|
24
|
+
*
|
|
25
|
+
* Authorities may return either a ready-made string token or a structured
|
|
26
|
+
* payload object. Structured claims are serialized here so the WebSocket auth
|
|
27
|
+
* payload and downstream channel logic keep receiving a string.
|
|
28
|
+
*/
|
|
29
|
+
export declare const normalizeAuthorityClaimOrThrow: (claim: unknown) => string;
|
|
22
30
|
/**
|
|
23
31
|
* Verifies a JWT token and returns the payload or throws if invalid.
|
|
24
32
|
*
|