@denodeio/seshat 0.0.38 → 1.0.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/README.md +2 -54
- package/package.json +10 -39
- package/src/index.d.ts +2 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +1 -0
- package/{build/cjs/dist/mjs/src/middleware/index.d.ts → src/lib/middleware.d.ts} +3 -2
- package/src/lib/middleware.d.ts.map +1 -0
- package/src/lib/middleware.js +38 -0
- package/src/lib/seshat.d.ts +5 -0
- package/src/lib/seshat.d.ts.map +1 -0
- package/src/lib/seshat.js +4 -0
- package/src/lib/signer.d.ts +21 -0
- package/src/lib/signer.d.ts.map +1 -0
- package/src/lib/signer.js +44 -0
- package/{build/mjs/dist/mjs/src → src/lib}/types.d.ts +1 -0
- package/src/lib/types.d.ts.map +1 -0
- package/src/lib/types.js +1 -0
- package/{build/cjs/dist/mjs/src → src/lib}/utils.d.ts +1 -0
- package/src/lib/utils.d.ts.map +1 -0
- package/src/lib/utils.js +6 -0
- package/{build/cjs/dist/mjs/src → src/lib}/validate.d.ts +2 -1
- package/src/lib/validate.d.ts.map +1 -0
- package/src/lib/validate.js +72 -0
- package/build/cjs/dist/mjs/src/index.d.ts +0 -4
- package/build/cjs/dist/mjs/src/signer.d.ts +0 -14
- package/build/cjs/dist/mjs/src/types.d.ts +0 -6
- package/build/cjs/index.d.ts +0 -61
- package/build/cjs/index.js +0 -6725
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/package.json +0 -3
- package/build/mjs/dist/mjs/src/index.d.ts +0 -4
- package/build/mjs/dist/mjs/src/middleware/index.d.ts +0 -9
- package/build/mjs/dist/mjs/src/signer.d.ts +0 -14
- package/build/mjs/dist/mjs/src/utils.d.ts +0 -7
- package/build/mjs/dist/mjs/src/validate.d.ts +0 -30
- package/build/mjs/index.d.ts +0 -61
- package/build/mjs/index.js +0 -6652
- package/build/mjs/index.js.map +0 -1
- package/build/mjs/package.json +0 -3
package/build/cjs/package.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const managementSigner: (options: any) => (req: any, res: any, next: any) => void;
|
|
2
|
-
type OptionsInput = {
|
|
3
|
-
fieldName?: string;
|
|
4
|
-
barongJwtPublicKey?: string;
|
|
5
|
-
jwtPublicKey?: string;
|
|
6
|
-
issuer?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const sessionVerifier: (options: OptionsInput) => (req: any, res: any, next: any) => void;
|
|
9
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
type SignJwsResponse = {
|
|
2
|
-
payload: string;
|
|
3
|
-
signatures: {
|
|
4
|
-
protected: string;
|
|
5
|
-
header: {
|
|
6
|
-
kid: string;
|
|
7
|
-
};
|
|
8
|
-
signature: string;
|
|
9
|
-
}[];
|
|
10
|
-
};
|
|
11
|
-
export declare function signJws(payload: string, options: any): SignJwsResponse;
|
|
12
|
-
export declare function signPayload(payload: any, options: any): string;
|
|
13
|
-
export declare function signData(payload: object, options: any): SignJwsResponse;
|
|
14
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Key, Keychain } from "./types";
|
|
2
|
-
type JwsSignature = {
|
|
3
|
-
protected: string;
|
|
4
|
-
header: {
|
|
5
|
-
kid: string;
|
|
6
|
-
};
|
|
7
|
-
signature: string;
|
|
8
|
-
};
|
|
9
|
-
type JwsPayload = {
|
|
10
|
-
payload: string;
|
|
11
|
-
signatures: JwsSignature[];
|
|
12
|
-
};
|
|
13
|
-
type JwtPayload<T> = {
|
|
14
|
-
iss: string;
|
|
15
|
-
exp: number;
|
|
16
|
-
jti: string;
|
|
17
|
-
event: {
|
|
18
|
-
name: string;
|
|
19
|
-
record: T;
|
|
20
|
-
};
|
|
21
|
-
iat: number;
|
|
22
|
-
};
|
|
23
|
-
export declare const validateJws: <T>(key: Key, input: JwsPayload) => JwtPayload<T> | undefined;
|
|
24
|
-
export declare const validateJwsMultisig: <T>(keychain: Keychain, input: JwsPayload) => {
|
|
25
|
-
isVerified: boolean;
|
|
26
|
-
payload: T;
|
|
27
|
-
verified: string[];
|
|
28
|
-
unverified: string[];
|
|
29
|
-
};
|
|
30
|
-
export {};
|
package/build/mjs/index.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Secret, PublicKey } from 'jsonwebtoken';
|
|
2
|
-
|
|
3
|
-
declare const managementSigner: (options: any) => (req: any, res: any, next: any) => void;
|
|
4
|
-
type OptionsInput = {
|
|
5
|
-
fieldName?: string;
|
|
6
|
-
barongJwtPublicKey?: string;
|
|
7
|
-
jwtPublicKey?: string;
|
|
8
|
-
issuer?: string;
|
|
9
|
-
};
|
|
10
|
-
declare const sessionVerifier: (options: OptionsInput) => (req: any, res: any, next: any) => void;
|
|
11
|
-
|
|
12
|
-
type SignJwsResponse = {
|
|
13
|
-
payload: string;
|
|
14
|
-
signatures: {
|
|
15
|
-
protected: string;
|
|
16
|
-
header: {
|
|
17
|
-
kid: string;
|
|
18
|
-
};
|
|
19
|
-
signature: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
declare function signJws(payload: string, options: any): SignJwsResponse;
|
|
23
|
-
declare function signPayload(payload: any, options: any): string;
|
|
24
|
-
declare function signData(payload: object, options: any): SignJwsResponse;
|
|
25
|
-
|
|
26
|
-
type Key = {
|
|
27
|
-
algorithm: string;
|
|
28
|
-
value: Secret | PublicKey;
|
|
29
|
-
};
|
|
30
|
-
type Keychain = Map<string, Key>;
|
|
31
|
-
|
|
32
|
-
type JwsSignature = {
|
|
33
|
-
protected: string;
|
|
34
|
-
header: {
|
|
35
|
-
kid: string;
|
|
36
|
-
};
|
|
37
|
-
signature: string;
|
|
38
|
-
};
|
|
39
|
-
type JwsPayload = {
|
|
40
|
-
payload: string;
|
|
41
|
-
signatures: JwsSignature[];
|
|
42
|
-
};
|
|
43
|
-
type JwtPayload<T> = {
|
|
44
|
-
iss: string;
|
|
45
|
-
exp: number;
|
|
46
|
-
jti: string;
|
|
47
|
-
event: {
|
|
48
|
-
name: string;
|
|
49
|
-
record: T;
|
|
50
|
-
};
|
|
51
|
-
iat: number;
|
|
52
|
-
};
|
|
53
|
-
declare const validateJws: <T>(key: Key, input: JwsPayload) => JwtPayload<T> | undefined;
|
|
54
|
-
declare const validateJwsMultisig: <T>(keychain: Keychain, input: JwsPayload) => {
|
|
55
|
-
isVerified: boolean;
|
|
56
|
-
payload: T;
|
|
57
|
-
verified: string[];
|
|
58
|
-
unverified: string[];
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export { type Key, type Keychain, managementSigner, sessionVerifier, signData, signJws, signPayload, validateJws, validateJwsMultisig };
|