@celljs/oauth2-core 3.0.0 → 3.1.1
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/lib/node/authentication/index.js +2 -15
- package/lib/node/authentication/index.js.map +1 -1
- package/lib/node/authorization/index.js +2 -15
- package/lib/node/authorization/index.js.map +1 -1
- package/lib/node/endpoint/access-token-response-converter.js +2 -7
- package/lib/node/endpoint/access-token-response-converter.js.map +1 -1
- package/lib/node/endpoint/endpoint-protocol.d.ts +3 -3
- package/lib/node/endpoint/endpoint-protocol.js +3 -3
- package/lib/node/endpoint/index.js +3 -16
- package/lib/node/endpoint/index.js.map +1 -1
- package/lib/node/error/error-protocol.d.ts +12 -12
- package/lib/node/error/error-protocol.js +12 -12
- package/lib/node/error/index.js +3 -16
- package/lib/node/error/index.js.map +1 -1
- package/lib/node/index.js +7 -20
- package/lib/node/index.js.map +1 -1
- package/lib/node/oidc/index.js +2 -15
- package/lib/node/oidc/index.js.map +1 -1
- package/lib/node/oidc/oidc-protocol.d.ts +28 -28
- package/lib/node/oidc/oidc-protocol.js +28 -28
- package/lib/node/token/index.js +2 -15
- package/lib/node/token/index.js.map +1 -1
- package/lib/node/token/token-protocol.d.ts +12 -12
- package/lib/node/token/token-protocol.js +12 -12
- package/package.json +7 -6
- package/src/node/endpoint/endpoint-protocol.ts +3 -3
- package/src/node/error/error-protocol.ts +12 -12
- package/src/node/oidc/oidc-protocol.ts +28 -28
- package/src/node/token/token-protocol.ts +12 -12
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./authentication-protocol"), exports);
|
|
18
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/authentication/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/authentication/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C"}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./authorization-protocol"), exports);
|
|
18
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/authorization/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/authorization/index.ts"],"names":[],"mappings":";;;AAAA,mEAAyC"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
2
|
var AccessTokenResponseConverter_1;
|
|
9
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
4
|
exports.AccessTokenResponseConverter = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
11
6
|
const token_1 = require("../token");
|
|
12
7
|
const endpoint_protocol_1 = require("./endpoint-protocol");
|
|
13
8
|
const core_1 = require("@celljs/core");
|
|
@@ -63,7 +58,7 @@ let AccessTokenResponseConverter = AccessTokenResponseConverter_1 = class Access
|
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
60
|
};
|
|
66
|
-
AccessTokenResponseConverter = AccessTokenResponseConverter_1 = __decorate([
|
|
61
|
+
AccessTokenResponseConverter = AccessTokenResponseConverter_1 = tslib_1.__decorate([
|
|
67
62
|
(0, core_1.Component)(AccessTokenResponseConverter_1)
|
|
68
63
|
], AccessTokenResponseConverter);
|
|
69
64
|
exports.AccessTokenResponseConverter = AccessTokenResponseConverter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-token-response-converter.js","sourceRoot":"","sources":["../../../src/node/endpoint/access-token-response-converter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"access-token-response-converter.js","sourceRoot":"","sources":["../../../src/node/endpoint/access-token-response-converter.ts"],"names":[],"mappings":";;;;;AAAA,oCAAqC;AACrC,2DAAgF;AAChF,uCAAyC;AAGlC,IAAM,4BAA4B,oCAAlC,MAAM,4BAA4B;IACrC,OAAO,CAAC,aAAwC;QAC5C,MAAM,WAAW,GAAG,aAAa,CAAC,wCAAoB,CAAC,YAAY,CAAC,CAAC;QACrE,MAAM,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;QACzD,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAC7C,MAAM,YAAY,GAAG,aAAa,CAAC,wCAAoB,CAAC,aAAa,CAAC,CAAC;QAEvE,MAAM,eAAe,GAAG;YACpB,wCAAoB,CAAC,YAAY;YACjC,wCAAoB,CAAC,UAAU;YAC/B,wCAAoB,CAAC,aAAa;YAClC,wCAAoB,CAAC,KAAK;YAC1B,wCAAoB,CAAC,UAAU;SAClC,CAAC;QACF,MAAM,oBAAoB,GAA8B,EAAE,CAAC;QAC3D,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE;YAC7B,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC5F,oBAAoB,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;aAClD;SACJ;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC5B,MAAM,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC;QAEhF,OAAO;YACH,WAAW,EAAE;gBACT,SAAS;gBACT,QAAQ;gBACR,SAAS;gBACT,UAAU,EAAE,WAAW;gBACvB,MAAM;aACT;YACD,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;YAC/E,oBAAoB;SACvB,CAAC;IAEN,CAAC;IAES,SAAS,CAAC,aAAyC;QACzD,IAAI,aAAa,CAAC,wCAAoB,CAAC,KAAK,CAAC,EAAE;YAC3C,OAAO,aAAa,CAAC,wCAAoB,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SAC/D;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAES,YAAY,CAAC,aAAyC;QAC5D,IAAI,aAAa,CAAC,wCAAoB,CAAC,UAAU,CAAC,EAAE;YAChD,OAAO,QAAQ,CAAC,aAAa,CAAC,wCAAoB,CAAC,UAAU,CAAC,CAAC,CAAC;SACnE;QACD,OAAO,CAAC,CAAC;IACb,CAAC;IAES,kBAAkB,CAAC,aAAyC;QAClE,IAAI,iBAAS,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,wCAAoB,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE;YACzG,OAAO,iBAAS,CAAC,MAAM,CAAC;SAC3B;IACL,CAAC;CACJ,CAAA;AA1DY,4BAA4B;IADxC,IAAA,gBAAS,EAAC,8BAA4B,CAAC;GAC3B,4BAA4B,CA0DxC;AA1DY,oEAA4B"}
|
|
@@ -76,15 +76,15 @@ export declare namespace OAuth2ParameterNames {
|
|
|
76
76
|
}
|
|
77
77
|
export declare namespace PkceParameterNames {
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* `code_challenge`- used in Authorization Request.
|
|
80
80
|
*/
|
|
81
81
|
const CODE_CHALLENGE = "code_challenge";
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* `code_challenge_method`- used in Authorization Request.
|
|
84
84
|
*/
|
|
85
85
|
const CODE_CHALLENGE_METHOD = "code_challenge_method";
|
|
86
86
|
/**
|
|
87
|
-
*
|
|
87
|
+
* `code_verifier`- used in Token Request.
|
|
88
88
|
*/
|
|
89
89
|
const CODE_VERIFIER = "code_verifier";
|
|
90
90
|
}
|
|
@@ -79,15 +79,15 @@ var OAuth2ParameterNames;
|
|
|
79
79
|
var PkceParameterNames;
|
|
80
80
|
(function (PkceParameterNames) {
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
82
|
+
* `code_challenge`- used in Authorization Request.
|
|
83
83
|
*/
|
|
84
84
|
PkceParameterNames.CODE_CHALLENGE = 'code_challenge';
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* `code_challenge_method`- used in Authorization Request.
|
|
87
87
|
*/
|
|
88
88
|
PkceParameterNames.CODE_CHALLENGE_METHOD = 'code_challenge_method';
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* `code_verifier`- used in Token Request.
|
|
91
91
|
*/
|
|
92
92
|
PkceParameterNames.CODE_VERIFIER = 'code_verifier';
|
|
93
93
|
})(PkceParameterNames = exports.PkceParameterNames || (exports.PkceParameterNames = {}));
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./endpoint-protocol"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./access-token-response-converter"), exports);
|
|
19
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/endpoint/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/endpoint/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,4EAAkD"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
export declare enum OAuth2ErrorCodes {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* `invalid_request` - The request is missing a required parameter,
|
|
4
4
|
* includes an invalid parameter value,
|
|
5
5
|
* includes a parameter more than once, or is otherwise malformed.
|
|
6
6
|
*/
|
|
7
7
|
INVALID_REQUEST = "invalid_request",
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* `unauthorized_client` - The client is not authorized to request
|
|
10
10
|
* an authorization code or access token using this method.
|
|
11
11
|
*/
|
|
12
12
|
UNAUTHORIZED_CLIENT = "unauthorized_client",
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* `access_denied` - The resource owner or authorization server denied the request.
|
|
15
15
|
*/
|
|
16
16
|
ACCESS_DENIED = "access_denied",
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* `unsupported_response_type` - The authorization server does not support
|
|
19
19
|
* obtaining an authorization code or access token using this method.
|
|
20
20
|
*/
|
|
21
21
|
UNSUPPORTED_RESPONSE_TYPE = "unsupported_response_type",
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* `invalid_scope` - The requested scope is invalid, unknown, malformed or
|
|
24
24
|
* exceeds the scope granted by the resource owner.
|
|
25
25
|
*/
|
|
26
26
|
INVALID_SCOPE = "invalid_scope",
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* `insufficient_scope` - The request requires higher privileges than
|
|
29
29
|
* provided by the access token.
|
|
30
30
|
* The resource server SHOULD respond with the HTTP 403 (Forbidden)
|
|
31
31
|
* status code and MAY include the 'scope' attribute with the scope
|
|
@@ -35,7 +35,7 @@ export declare enum OAuth2ErrorCodes {
|
|
|
35
35
|
*/
|
|
36
36
|
INSUFFICIENT_SCOPE = "insufficient_scope",
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* `invalid_token` - The access token provided is expired, revoked,
|
|
39
39
|
* malformed, or invalid for other reasons.
|
|
40
40
|
* The resource SHOULD respond with the HTTP 401 (Unauthorized) status code.
|
|
41
41
|
* The client MAY request a new access token and retry the protected resource request.
|
|
@@ -44,21 +44,21 @@ export declare enum OAuth2ErrorCodes {
|
|
|
44
44
|
*/
|
|
45
45
|
INVALID_TOKEN = "invalid_token",
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* `server_error` - The authorization server encountered an
|
|
48
48
|
* unexpected condition that prevented it from fulfilling the request.
|
|
49
49
|
* (This error code is needed because a 500 Internal Server Error HTTP status code
|
|
50
50
|
* cannot be returned to the client via a HTTP redirect.)
|
|
51
51
|
*/
|
|
52
52
|
SERVER_ERROR = "server_error",
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* `temporarily_unavailable` - The authorization server is currently unable
|
|
55
55
|
* to handle the request due to a temporary overloading or maintenance of the server.
|
|
56
56
|
* (This error code is needed because a 503 Service Unavailable HTTP status code
|
|
57
57
|
* cannot be returned to the client via an HTTP redirect.)
|
|
58
58
|
*/
|
|
59
59
|
TEMPORARILY_UNAVAILABLE = "temporarily_unavailable",
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* `invalid_client` - Client authentication failed (e.g., unknown client,
|
|
62
62
|
* no client authentication included, or unsupported authentication method).
|
|
63
63
|
* The authorization server MAY return a HTTP 401 (Unauthorized) status code
|
|
64
64
|
* to indicate which HTTP authentication schemes are supported.
|
|
@@ -68,13 +68,13 @@ export declare enum OAuth2ErrorCodes {
|
|
|
68
68
|
*/
|
|
69
69
|
INVALID_CLIENT = "invalid_client",
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* `invalid_grant` - The provided authorization grant
|
|
72
72
|
* (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked,
|
|
73
73
|
* does not match the redirection URI used in the authorization request, or was issued to another client.
|
|
74
74
|
*/
|
|
75
75
|
INVALID_GRANT = "invalid_grant",
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* `unsupported_grant_type` - The authorization grant type is not supported by the authorization server.
|
|
78
78
|
*/
|
|
79
79
|
UNSUPPORTED_GRANT_TYPE = "unsupported_grant_type"
|
|
80
80
|
}
|
|
@@ -4,32 +4,32 @@ exports.OAuth2ErrorCodes = void 0;
|
|
|
4
4
|
var OAuth2ErrorCodes;
|
|
5
5
|
(function (OAuth2ErrorCodes) {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* `invalid_request` - The request is missing a required parameter,
|
|
8
8
|
* includes an invalid parameter value,
|
|
9
9
|
* includes a parameter more than once, or is otherwise malformed.
|
|
10
10
|
*/
|
|
11
11
|
OAuth2ErrorCodes["INVALID_REQUEST"] = "invalid_request";
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* `unauthorized_client` - The client is not authorized to request
|
|
14
14
|
* an authorization code or access token using this method.
|
|
15
15
|
*/
|
|
16
16
|
OAuth2ErrorCodes["UNAUTHORIZED_CLIENT"] = "unauthorized_client";
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* `access_denied` - The resource owner or authorization server denied the request.
|
|
19
19
|
*/
|
|
20
20
|
OAuth2ErrorCodes["ACCESS_DENIED"] = "access_denied";
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* `unsupported_response_type` - The authorization server does not support
|
|
23
23
|
* obtaining an authorization code or access token using this method.
|
|
24
24
|
*/
|
|
25
25
|
OAuth2ErrorCodes["UNSUPPORTED_RESPONSE_TYPE"] = "unsupported_response_type";
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* `invalid_scope` - The requested scope is invalid, unknown, malformed or
|
|
28
28
|
* exceeds the scope granted by the resource owner.
|
|
29
29
|
*/
|
|
30
30
|
OAuth2ErrorCodes["INVALID_SCOPE"] = "invalid_scope";
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* `insufficient_scope` - The request requires higher privileges than
|
|
33
33
|
* provided by the access token.
|
|
34
34
|
* The resource server SHOULD respond with the HTTP 403 (Forbidden)
|
|
35
35
|
* status code and MAY include the 'scope' attribute with the scope
|
|
@@ -39,7 +39,7 @@ var OAuth2ErrorCodes;
|
|
|
39
39
|
*/
|
|
40
40
|
OAuth2ErrorCodes["INSUFFICIENT_SCOPE"] = "insufficient_scope";
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* `invalid_token` - The access token provided is expired, revoked,
|
|
43
43
|
* malformed, or invalid for other reasons.
|
|
44
44
|
* The resource SHOULD respond with the HTTP 401 (Unauthorized) status code.
|
|
45
45
|
* The client MAY request a new access token and retry the protected resource request.
|
|
@@ -48,21 +48,21 @@ var OAuth2ErrorCodes;
|
|
|
48
48
|
*/
|
|
49
49
|
OAuth2ErrorCodes["INVALID_TOKEN"] = "invalid_token";
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* `server_error` - The authorization server encountered an
|
|
52
52
|
* unexpected condition that prevented it from fulfilling the request.
|
|
53
53
|
* (This error code is needed because a 500 Internal Server Error HTTP status code
|
|
54
54
|
* cannot be returned to the client via a HTTP redirect.)
|
|
55
55
|
*/
|
|
56
56
|
OAuth2ErrorCodes["SERVER_ERROR"] = "server_error";
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
58
|
+
* `temporarily_unavailable` - The authorization server is currently unable
|
|
59
59
|
* to handle the request due to a temporary overloading or maintenance of the server.
|
|
60
60
|
* (This error code is needed because a 503 Service Unavailable HTTP status code
|
|
61
61
|
* cannot be returned to the client via an HTTP redirect.)
|
|
62
62
|
*/
|
|
63
63
|
OAuth2ErrorCodes["TEMPORARILY_UNAVAILABLE"] = "temporarily_unavailable";
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* `invalid_client` - Client authentication failed (e.g., unknown client,
|
|
66
66
|
* no client authentication included, or unsupported authentication method).
|
|
67
67
|
* The authorization server MAY return a HTTP 401 (Unauthorized) status code
|
|
68
68
|
* to indicate which HTTP authentication schemes are supported.
|
|
@@ -72,13 +72,13 @@ var OAuth2ErrorCodes;
|
|
|
72
72
|
*/
|
|
73
73
|
OAuth2ErrorCodes["INVALID_CLIENT"] = "invalid_client";
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* `invalid_grant` - The provided authorization grant
|
|
76
76
|
* (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked,
|
|
77
77
|
* does not match the redirection URI used in the authorization request, or was issued to another client.
|
|
78
78
|
*/
|
|
79
79
|
OAuth2ErrorCodes["INVALID_GRANT"] = "invalid_grant";
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* `unsupported_grant_type` - The authorization grant type is not supported by the authorization server.
|
|
82
82
|
*/
|
|
83
83
|
OAuth2ErrorCodes["UNSUPPORTED_GRANT_TYPE"] = "unsupported_grant_type";
|
|
84
84
|
})(OAuth2ErrorCodes = exports.OAuth2ErrorCodes || (exports.OAuth2ErrorCodes = {}));
|
package/lib/node/error/index.js
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./error
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./error"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./error-protocol"), exports);
|
|
19
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/error/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/error/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,2DAAiC"}
|
package/lib/node/index.js
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./authentication"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./authorization"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./endpoint"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./oidc"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./token"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./error"), exports);
|
|
23
10
|
//# sourceMappingURL=index.js.map
|
package/lib/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,0DAAgC;AAChC,qDAA2B;AAC3B,iDAAuB;AACvB,kDAAwB;AACxB,kDAAwB"}
|
package/lib/node/oidc/index.js
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./oidc-protocol"), exports);
|
|
18
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/oidc/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/oidc/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC"}
|
|
@@ -1,116 +1,116 @@
|
|
|
1
1
|
export declare namespace OidcScopes {
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
3
|
+
* The `openid`scope is required for OpenID Connect Authentication Requests.
|
|
4
4
|
*/
|
|
5
5
|
const OPENID = "openid";
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
8
|
-
*
|
|
7
|
+
* The `profile`scope requests access to the default profile claims, which are:
|
|
8
|
+
* `name, family_name, given_name, middle_name, nickname, preferred_username,
|
|
9
9
|
* profile, picture, website, gender, birthdate, zoneinfo, locale, updated_at}.
|
|
10
10
|
*/
|
|
11
11
|
const PROFILE = "profile";
|
|
12
12
|
/**
|
|
13
|
-
* The
|
|
13
|
+
* The `email`scope requests access to the `email`and `email_verified`claims.
|
|
14
14
|
*/
|
|
15
15
|
const EMAIL = "email";
|
|
16
16
|
/**
|
|
17
|
-
* The
|
|
17
|
+
* The `address`scope requests access to the `address`claim.
|
|
18
18
|
*/
|
|
19
19
|
const ADDRESS = "address";
|
|
20
20
|
/**
|
|
21
|
-
* The
|
|
21
|
+
* The `phone`scope requests access to the `phone_number`and `phone_number_verified`claims.
|
|
22
22
|
*/
|
|
23
23
|
const PHONE = "phone";
|
|
24
24
|
}
|
|
25
25
|
export declare namespace OidcParameterNames {
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* `id_token`- used in the Access Token Response.
|
|
28
28
|
*/
|
|
29
29
|
const ID_TOKEN = "id_token";
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* `nonce`- used in the Authentication Request.
|
|
32
32
|
*/
|
|
33
33
|
const NONCE = "nonce";
|
|
34
34
|
}
|
|
35
35
|
export declare namespace StandardClaimNames {
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* `sub`- the Subject identifier
|
|
38
38
|
*/
|
|
39
39
|
const SUB = "sub";
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* `name`- the user's full name
|
|
42
42
|
*/
|
|
43
43
|
const NAME = "name";
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* `given_name`- the user's given name(s) or first name(s)
|
|
46
46
|
*/
|
|
47
47
|
const GIVEN_NAME = "given_name";
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* `family_name`- the user's surname(s) or last name(s)
|
|
50
50
|
*/
|
|
51
51
|
const FAMILY_NAME = "family_name";
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* `middle_name`- the user's middle name(s)
|
|
54
54
|
*/
|
|
55
55
|
const MIDDLE_NAME = "middle_name";
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* `nickname`- the user's nick name that may or may not be the same as the `given_name}
|
|
58
58
|
*/
|
|
59
59
|
const NICKNAME = "nickname";
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* `preferred_username`- the preferred username that the user wishes to be referred to
|
|
62
62
|
*/
|
|
63
63
|
const PREFERRED_USERNAME = "preferred_username";
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* `profile`- the URL of the user's profile page
|
|
66
66
|
*/
|
|
67
67
|
const PROFILE = "profile";
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* `picture`- the URL of the user's profile picture
|
|
70
70
|
*/
|
|
71
71
|
const PICTURE = "picture";
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* `website`- the URL of the user's web page or blog
|
|
74
74
|
*/
|
|
75
75
|
const WEBSITE = "website";
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* `email`- the user's preferred e-mail address
|
|
78
78
|
*/
|
|
79
79
|
const EMAIL = "email";
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* `email_verified`- `true`if the user's e-mail address has been verified, otherwise `false}
|
|
82
82
|
*/
|
|
83
83
|
const EMAIL_VERIFIED = "email_verified";
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* `gender`- the user's gender
|
|
86
86
|
*/
|
|
87
87
|
const GENDER = "gender";
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* `birthdate`- the user's birth date
|
|
90
90
|
*/
|
|
91
91
|
const BIRTHDATE = "birthdate";
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* `zoneinfo`- the user's time zone
|
|
94
94
|
*/
|
|
95
95
|
const ZONEINFO = "zoneinfo";
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* `locale`- the user's locale
|
|
98
98
|
*/
|
|
99
99
|
const LOCALE = "locale";
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* `phone_number`- the user's preferred phone number
|
|
102
102
|
*/
|
|
103
103
|
const PHONE_NUMBER = "phone_number";
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* `phone_number_verified`- `true`if the user's phone number has been verified, otherwise `false}
|
|
106
106
|
*/
|
|
107
107
|
const PHONE_NUMBER_VERIFIED = "phone_number_verified";
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
109
|
+
* `address`- the user's preferred postal address
|
|
110
110
|
*/
|
|
111
111
|
const ADDRESS = "address";
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* `updated_at`- the time the user's information was last updated
|
|
114
114
|
*/
|
|
115
115
|
const UPDATED_AT = "updated_at";
|
|
116
116
|
}
|