@celljs/oauth2-core 3.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/LICENSE +21 -0
- package/README.md +1 -0
- package/cell.yml +0 -0
- package/lib/node/authentication/authentication-protocol.d.ts +11 -0
- package/lib/node/authentication/authentication-protocol.d.ts.map +1 -0
- package/lib/node/authentication/authentication-protocol.js +16 -0
- package/lib/node/authentication/authentication-protocol.js.map +1 -0
- package/lib/node/authentication/index.d.ts +2 -0
- package/lib/node/authentication/index.d.ts.map +1 -0
- package/lib/node/authentication/index.js +18 -0
- package/lib/node/authentication/index.js.map +1 -0
- package/lib/node/authorization/authorization-protocol.d.ts +12 -0
- package/lib/node/authorization/authorization-protocol.d.ts.map +1 -0
- package/lib/node/authorization/authorization-protocol.js +17 -0
- package/lib/node/authorization/authorization-protocol.js.map +1 -0
- package/lib/node/authorization/index.d.ts +2 -0
- package/lib/node/authorization/index.d.ts.map +1 -0
- package/lib/node/authorization/index.js +18 -0
- package/lib/node/authorization/index.js.map +1 -0
- package/lib/node/endpoint/access-token-response-converter.d.ts +17 -0
- package/lib/node/endpoint/access-token-response-converter.d.ts.map +1 -0
- package/lib/node/endpoint/access-token-response-converter.js +70 -0
- package/lib/node/endpoint/access-token-response-converter.js.map +1 -0
- package/lib/node/endpoint/endpoint-protocol.d.ts +129 -0
- package/lib/node/endpoint/endpoint-protocol.d.ts.map +1 -0
- package/lib/node/endpoint/endpoint-protocol.js +97 -0
- package/lib/node/endpoint/endpoint-protocol.js.map +1 -0
- package/lib/node/endpoint/index.d.ts +3 -0
- package/lib/node/endpoint/index.d.ts.map +1 -0
- package/lib/node/endpoint/index.js +19 -0
- package/lib/node/endpoint/index.js.map +1 -0
- package/lib/node/error/error-protocol.d.ts +81 -0
- package/lib/node/error/error-protocol.d.ts.map +1 -0
- package/lib/node/error/error-protocol.js +85 -0
- package/lib/node/error/error-protocol.js.map +1 -0
- package/lib/node/error/error.d.ts +12 -0
- package/lib/node/error/error.d.ts.map +1 -0
- package/lib/node/error/error.js +20 -0
- package/lib/node/error/error.js.map +1 -0
- package/lib/node/error/index.d.ts +3 -0
- package/lib/node/error/index.d.ts.map +1 -0
- package/lib/node/error/index.js +19 -0
- package/lib/node/error/index.js.map +1 -0
- package/lib/node/index.d.ts +7 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +23 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/module.d.ts +4 -0
- package/lib/node/module.d.ts.map +1 -0
- package/lib/node/module.js +6 -0
- package/lib/node/module.js.map +1 -0
- package/lib/node/oidc/index.d.ts +2 -0
- package/lib/node/oidc/index.d.ts.map +1 -0
- package/lib/node/oidc/index.js +18 -0
- package/lib/node/oidc/index.js.map +1 -0
- package/lib/node/oidc/oidc-protocol.d.ts +117 -0
- package/lib/node/oidc/oidc-protocol.d.ts.map +1 -0
- package/lib/node/oidc/oidc-protocol.js +123 -0
- package/lib/node/oidc/oidc-protocol.js.map +1 -0
- package/lib/node/token/index.d.ts +2 -0
- package/lib/node/token/index.d.ts.map +1 -0
- package/lib/node/token/index.js +18 -0
- package/lib/node/token/index.js.map +1 -0
- package/lib/node/token/token-protocol.d.ts +66 -0
- package/lib/node/token/token-protocol.d.ts.map +1 -0
- package/lib/node/token/token-protocol.js +60 -0
- package/lib/node/token/token-protocol.js.map +1 -0
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.d.ts.map +1 -0
- package/lib/package.spec.js +4 -0
- package/lib/package.spec.js.map +1 -0
- package/package.json +45 -0
- package/src/node/authentication/authentication-protocol.ts +11 -0
- package/src/node/authentication/index.ts +1 -0
- package/src/node/authorization/authorization-protocol.ts +12 -0
- package/src/node/authorization/index.ts +1 -0
- package/src/node/endpoint/access-token-response-converter.ts +64 -0
- package/src/node/endpoint/endpoint-protocol.ts +150 -0
- package/src/node/endpoint/index.ts +2 -0
- package/src/node/error/error-protocol.ts +93 -0
- package/src/node/error/error.ts +19 -0
- package/src/node/error/index.ts +2 -0
- package/src/node/index.ts +6 -0
- package/src/node/module.ts +4 -0
- package/src/node/oidc/index.ts +1 -0
- package/src/node/oidc/oidc-protocol.ts +148 -0
- package/src/node/token/index.ts +1 -0
- package/src/node/token/token-protocol.ts +81 -0
- package/src/package.spec.ts +4 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export interface Token {
|
|
2
|
+
tokenValue: string;
|
|
3
|
+
issuedAt: number;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export enum TokenType {
|
|
7
|
+
Bearer = 'Bearer'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface AccessToken extends Token {
|
|
11
|
+
tokenType?: TokenType;
|
|
12
|
+
scopes: string[];
|
|
13
|
+
expiresAt: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface RefreshToken extends Token {}
|
|
17
|
+
|
|
18
|
+
export namespace IdTokenClaimNames {
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* {@code iss} - the Issuer identifier
|
|
22
|
+
*/
|
|
23
|
+
export const ISS = 'iss';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* {@code sub} - the Subject identifier
|
|
27
|
+
*/
|
|
28
|
+
export const SUB = 'sub';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* {@code aud} - the Audience(s) that the ID Token is intended for
|
|
32
|
+
*/
|
|
33
|
+
export const AUD = 'aud';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* {@code exp} - the Expiration time on or after which the ID Token MUST NOT be accepted
|
|
37
|
+
*/
|
|
38
|
+
export const EXP = 'exp';
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* {@code iat} - the time at which the ID Token was issued
|
|
42
|
+
*/
|
|
43
|
+
export const IAT = 'iat';
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* {@code auth_time} - the time when the End-User authentication occurred
|
|
47
|
+
*/
|
|
48
|
+
export const AUTH_TIME = 'auth_time';
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* {@code nonce} - a {@code export const} value used to associate a Client session with an ID Token,
|
|
52
|
+
* and to mitigate replay attacks.
|
|
53
|
+
*/
|
|
54
|
+
export const NONCE = 'nonce';
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* {@code acr} - the Authentication Context Class Reference
|
|
58
|
+
*/
|
|
59
|
+
export const ACR = 'acr';
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* {@code amr} - the Authentication Methods References
|
|
63
|
+
*/
|
|
64
|
+
export const AMR = 'amr';
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* {@code azp} - the Authorized party to which the ID Token was issued
|
|
68
|
+
*/
|
|
69
|
+
export const AZP = 'azp';
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* {@code at_hash} - the Access Token hash value
|
|
73
|
+
*/
|
|
74
|
+
export const AT_HASH = 'at_hash';
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* {@code c_hash} - the Authorization Code hash value
|
|
78
|
+
*/
|
|
79
|
+
export const C_HASH = 'c_hash';
|
|
80
|
+
|
|
81
|
+
}
|