@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.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/cell.yml +0 -0
  4. package/lib/node/authentication/authentication-protocol.d.ts +11 -0
  5. package/lib/node/authentication/authentication-protocol.d.ts.map +1 -0
  6. package/lib/node/authentication/authentication-protocol.js +16 -0
  7. package/lib/node/authentication/authentication-protocol.js.map +1 -0
  8. package/lib/node/authentication/index.d.ts +2 -0
  9. package/lib/node/authentication/index.d.ts.map +1 -0
  10. package/lib/node/authentication/index.js +18 -0
  11. package/lib/node/authentication/index.js.map +1 -0
  12. package/lib/node/authorization/authorization-protocol.d.ts +12 -0
  13. package/lib/node/authorization/authorization-protocol.d.ts.map +1 -0
  14. package/lib/node/authorization/authorization-protocol.js +17 -0
  15. package/lib/node/authorization/authorization-protocol.js.map +1 -0
  16. package/lib/node/authorization/index.d.ts +2 -0
  17. package/lib/node/authorization/index.d.ts.map +1 -0
  18. package/lib/node/authorization/index.js +18 -0
  19. package/lib/node/authorization/index.js.map +1 -0
  20. package/lib/node/endpoint/access-token-response-converter.d.ts +17 -0
  21. package/lib/node/endpoint/access-token-response-converter.d.ts.map +1 -0
  22. package/lib/node/endpoint/access-token-response-converter.js +70 -0
  23. package/lib/node/endpoint/access-token-response-converter.js.map +1 -0
  24. package/lib/node/endpoint/endpoint-protocol.d.ts +129 -0
  25. package/lib/node/endpoint/endpoint-protocol.d.ts.map +1 -0
  26. package/lib/node/endpoint/endpoint-protocol.js +97 -0
  27. package/lib/node/endpoint/endpoint-protocol.js.map +1 -0
  28. package/lib/node/endpoint/index.d.ts +3 -0
  29. package/lib/node/endpoint/index.d.ts.map +1 -0
  30. package/lib/node/endpoint/index.js +19 -0
  31. package/lib/node/endpoint/index.js.map +1 -0
  32. package/lib/node/error/error-protocol.d.ts +81 -0
  33. package/lib/node/error/error-protocol.d.ts.map +1 -0
  34. package/lib/node/error/error-protocol.js +85 -0
  35. package/lib/node/error/error-protocol.js.map +1 -0
  36. package/lib/node/error/error.d.ts +12 -0
  37. package/lib/node/error/error.d.ts.map +1 -0
  38. package/lib/node/error/error.js +20 -0
  39. package/lib/node/error/error.js.map +1 -0
  40. package/lib/node/error/index.d.ts +3 -0
  41. package/lib/node/error/index.d.ts.map +1 -0
  42. package/lib/node/error/index.js +19 -0
  43. package/lib/node/error/index.js.map +1 -0
  44. package/lib/node/index.d.ts +7 -0
  45. package/lib/node/index.d.ts.map +1 -0
  46. package/lib/node/index.js +23 -0
  47. package/lib/node/index.js.map +1 -0
  48. package/lib/node/module.d.ts +4 -0
  49. package/lib/node/module.d.ts.map +1 -0
  50. package/lib/node/module.js +6 -0
  51. package/lib/node/module.js.map +1 -0
  52. package/lib/node/oidc/index.d.ts +2 -0
  53. package/lib/node/oidc/index.d.ts.map +1 -0
  54. package/lib/node/oidc/index.js +18 -0
  55. package/lib/node/oidc/index.js.map +1 -0
  56. package/lib/node/oidc/oidc-protocol.d.ts +117 -0
  57. package/lib/node/oidc/oidc-protocol.d.ts.map +1 -0
  58. package/lib/node/oidc/oidc-protocol.js +123 -0
  59. package/lib/node/oidc/oidc-protocol.js.map +1 -0
  60. package/lib/node/token/index.d.ts +2 -0
  61. package/lib/node/token/index.d.ts.map +1 -0
  62. package/lib/node/token/index.js +18 -0
  63. package/lib/node/token/index.js.map +1 -0
  64. package/lib/node/token/token-protocol.d.ts +66 -0
  65. package/lib/node/token/token-protocol.d.ts.map +1 -0
  66. package/lib/node/token/token-protocol.js +60 -0
  67. package/lib/node/token/token-protocol.js.map +1 -0
  68. package/lib/package.spec.d.ts +1 -0
  69. package/lib/package.spec.d.ts.map +1 -0
  70. package/lib/package.spec.js +4 -0
  71. package/lib/package.spec.js.map +1 -0
  72. package/package.json +45 -0
  73. package/src/node/authentication/authentication-protocol.ts +11 -0
  74. package/src/node/authentication/index.ts +1 -0
  75. package/src/node/authorization/authorization-protocol.ts +12 -0
  76. package/src/node/authorization/index.ts +1 -0
  77. package/src/node/endpoint/access-token-response-converter.ts +64 -0
  78. package/src/node/endpoint/endpoint-protocol.ts +150 -0
  79. package/src/node/endpoint/index.ts +2 -0
  80. package/src/node/error/error-protocol.ts +93 -0
  81. package/src/node/error/error.ts +19 -0
  82. package/src/node/error/index.ts +2 -0
  83. package/src/node/index.ts +6 -0
  84. package/src/node/module.ts +4 -0
  85. package/src/node/oidc/index.ts +1 -0
  86. package/src/node/oidc/oidc-protocol.ts +148 -0
  87. package/src/node/token/index.ts +1 -0
  88. package/src/node/token/token-protocol.ts +81 -0
  89. 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
+ }
@@ -0,0 +1,4 @@
1
+ describe('oauth2 core package', () => {
2
+
3
+ it('support code coverage statistics', () => {});
4
+ });