@atproto/oauth-types 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +18 -0
- package/dist/atproto-loopback-client-metadata.js +1 -2
- package/dist/atproto-loopback-client-metadata.js.map +1 -1
- package/dist/constants.d.ts +0 -6
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -17
- package/dist/constants.js.map +1 -1
- package/dist/oauth-authorization-request-par.d.ts +3 -3
- package/dist/oauth-authorization-request-parameters.d.ts +3 -3
- package/dist/oauth-authorization-request-parameters.js +1 -1
- package/dist/oauth-authorization-request-parameters.js.map +1 -1
- package/dist/oauth-authorization-request-query.d.ts +3 -3
- package/dist/oauth-authorization-server-metadata.d.ts +6 -6
- package/dist/oauth-client-id-discoverable.js +3 -4
- package/dist/oauth-client-id-discoverable.js.map +1 -1
- package/dist/oauth-client-id-loopback.js +3 -4
- package/dist/oauth-client-id-loopback.js.map +1 -1
- package/dist/oauth-client-metadata.d.ts +90 -90
- package/dist/oauth-client-metadata.d.ts.map +1 -1
- package/dist/oauth-issuer-identifier.d.ts +2 -1
- package/dist/oauth-issuer-identifier.d.ts.map +1 -1
- package/dist/oauth-issuer-identifier.js +13 -12
- package/dist/oauth-issuer-identifier.js.map +1 -1
- package/dist/oauth-protected-resource-metadata.d.ts +2 -2
- package/dist/oauth-refresh-token-grant-token-request.d.ts +0 -3
- package/dist/oauth-refresh-token-grant-token-request.d.ts.map +1 -1
- package/dist/oauth-refresh-token-grant-token-request.js +0 -2
- package/dist/oauth-refresh-token-grant-token-request.js.map +1 -1
- package/dist/oauth-token-request.d.ts +0 -3
- package/dist/oauth-token-request.d.ts.map +1 -1
- package/dist/oauth-token-response.d.ts +3 -6
- package/dist/oauth-token-response.d.ts.map +1 -1
- package/dist/oauth-token-response.js +4 -2
- package/dist/oauth-token-response.js.map +1 -1
- package/dist/util.js +5 -6
- package/dist/util.js.map +1 -1
- package/package.json +2 -2
- package/src/constants.ts +0 -16
- package/src/oauth-authorization-request-parameters.ts +1 -1
- package/src/oauth-issuer-identifier.ts +17 -12
- package/src/oauth-refresh-token-grant-token-request.ts +0 -2
- package/src/oauth-token-response.ts +4 -2
- package/tsconfig.build.tsbuildinfo +1 -0
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# @atproto/oauth-types
|
2
2
|
|
3
|
+
## 0.2.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [#2874](https://github.com/bluesky-social/atproto/pull/2874) [`7f26b1765`](https://github.com/bluesky-social/atproto/commit/7f26b176526b9856a8f61faca6f065f0afd43abf) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Allow oauthIssuerIdentifier to be an "http:" url. Make sure to manually check for "http:" issuers if you don't allow them.
|
8
|
+
|
9
|
+
- [#2874](https://github.com/bluesky-social/atproto/pull/2874) [`7f26b1765`](https://github.com/bluesky-social/atproto/commit/7f26b176526b9856a8f61faca6f065f0afd43abf) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove ALLOW_UNSECURE_ORIGINS constant
|
10
|
+
|
11
|
+
- [#2871](https://github.com/bluesky-social/atproto/pull/2871) [`9d40ccbb6`](https://github.com/bluesky-social/atproto/commit/9d40ccbb69103fae9aae7e3cec31e9b3116f3ba2) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove invalid `issuer` property from OAuthTokenResponse
|
12
|
+
|
13
|
+
### Patch Changes
|
14
|
+
|
15
|
+
- [#2871](https://github.com/bluesky-social/atproto/pull/2871) [`9d40ccbb6`](https://github.com/bluesky-social/atproto/commit/9d40ccbb69103fae9aae7e3cec31e9b3116f3ba2) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add missing "wap" display request parameter value
|
16
|
+
|
17
|
+
- [#2871](https://github.com/bluesky-social/atproto/pull/2871) [`9d40ccbb6`](https://github.com/bluesky-social/atproto/commit/9d40ccbb69103fae9aae7e3cec31e9b3116f3ba2) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove invalid `client_id` property from oauthRefreshTokenGrantTokenRequestSchema
|
18
|
+
|
19
|
+
- [#2874](https://github.com/bluesky-social/atproto/pull/2874) [`7f26b1765`](https://github.com/bluesky-social/atproto/commit/7f26b176526b9856a8f61faca6f065f0afd43abf) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Improve typing of oauthIssuerIdentifierSchema
|
20
|
+
|
3
21
|
## 0.1.5
|
4
22
|
|
5
23
|
### Patch Changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.atprotoLoopbackClientMetadata =
|
3
|
+
exports.atprotoLoopbackClientMetadata = atprotoLoopbackClientMetadata;
|
4
4
|
const oauth_client_id_loopback_js_1 = require("./oauth-client-id-loopback.js");
|
5
5
|
function atprotoLoopbackClientMetadata(clientId) {
|
6
6
|
const { scope = 'atproto', redirect_uris = [`http://127.0.0.1/`, `http://[::1]/`], } = (0, oauth_client_id_loopback_js_1.parseOAuthLoopbackClientId)(clientId);
|
@@ -16,5 +16,4 @@ function atprotoLoopbackClientMetadata(clientId) {
|
|
16
16
|
dpop_bound_access_tokens: true,
|
17
17
|
};
|
18
18
|
}
|
19
|
-
exports.atprotoLoopbackClientMetadata = atprotoLoopbackClientMetadata;
|
20
19
|
//# sourceMappingURL=atproto-loopback-client-metadata.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"atproto-loopback-client-metadata.js","sourceRoot":"","sources":["../src/atproto-loopback-client-metadata.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"atproto-loopback-client-metadata.js","sourceRoot":"","sources":["../src/atproto-loopback-client-metadata.ts"],"names":[],"mappings":";;AAGA,sEAmBC;AAtBD,+EAA0E;AAG1E,SAAgB,6BAA6B,CAC3C,QAAgB;IAEhB,MAAM,EACJ,KAAK,GAAG,SAAS,EACjB,aAAa,GAAG,CAAC,mBAAmB,EAAE,eAAe,CAAC,GACvD,GAAG,IAAA,wDAA0B,EAAC,QAAQ,CAAC,CAAA;IAExC,OAAO;QACL,SAAS,EAAE,QAAQ;QACnB,KAAK;QACL,aAAa;QACb,WAAW,EAAE,iBAAiB;QAC9B,cAAc,EAAE,CAAC,MAAM,CAAC;QACxB,WAAW,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;QACpD,0BAA0B,EAAE,MAAM;QAClC,gBAAgB,EAAE,QAAQ;QAC1B,wBAAwB,EAAE,IAAI;KAC/B,CAAA;AACH,CAAC"}
|
package/dist/constants.d.ts
CHANGED
@@ -1,8 +1,2 @@
|
|
1
|
-
/**
|
2
|
-
* A variable that allows to determine if unsecure origins should be allowed
|
3
|
-
* in OAuth related URI's. This variable is only set to `true` when NODE_ENV
|
4
|
-
* is either `development` or `test`.
|
5
|
-
*/
|
6
|
-
export declare const ALLOW_UNSECURE_ORIGINS: boolean;
|
7
1
|
export declare const CLIENT_ASSERTION_TYPE_JWT_BEARER = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer";
|
8
2
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,2DACa,CAAA"}
|
package/dist/constants.js
CHANGED
@@ -1,21 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.CLIENT_ASSERTION_TYPE_JWT_BEARER =
|
4
|
-
/**
|
5
|
-
* A variable that allows to determine if unsecure origins should be allowed
|
6
|
-
* in OAuth related URI's. This variable is only set to `true` when NODE_ENV
|
7
|
-
* is either `development` or `test`.
|
8
|
-
*/
|
9
|
-
exports.ALLOW_UNSECURE_ORIGINS = (() => {
|
10
|
-
// try/catch to support running in a browser, including when process.env is
|
11
|
-
// shimmed (e.g. by webpack)
|
12
|
-
try {
|
13
|
-
const env = process.env.NODE_ENV;
|
14
|
-
return env === 'development' || env === 'test';
|
15
|
-
}
|
16
|
-
catch {
|
17
|
-
return false;
|
18
|
-
}
|
19
|
-
})();
|
3
|
+
exports.CLIENT_ASSERTION_TYPE_JWT_BEARER = void 0;
|
20
4
|
exports.CLIENT_ASSERTION_TYPE_JWT_BEARER = 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer';
|
21
5
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAC3C,wDAAwD,CAAA"}
|
@@ -27,7 +27,7 @@ export declare const oauthAuthorizationRequestParSchema: z.ZodUnion<[z.ZodObject
|
|
27
27
|
login_hint: z.ZodOptional<z.ZodString>;
|
28
28
|
ui_locales: z.ZodOptional<z.ZodString>;
|
29
29
|
id_token_hint: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>>;
|
30
|
-
display: z.ZodOptional<z.ZodEnum<["page", "popup", "touch"]>>;
|
30
|
+
display: z.ZodOptional<z.ZodEnum<["page", "popup", "touch", "wap"]>>;
|
31
31
|
prompt: z.ZodOptional<z.ZodEnum<["none", "login", "consent", "select_account"]>>;
|
32
32
|
authorization_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
33
33
|
type: z.ZodString;
|
@@ -71,7 +71,7 @@ export declare const oauthAuthorizationRequestParSchema: z.ZodUnion<[z.ZodObject
|
|
71
71
|
login_hint?: string | undefined;
|
72
72
|
ui_locales?: string | undefined;
|
73
73
|
id_token_hint?: `${string}.${string}.${string}` | undefined;
|
74
|
-
display?: "page" | "popup" | "touch" | undefined;
|
74
|
+
display?: "page" | "popup" | "touch" | "wap" | undefined;
|
75
75
|
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
76
76
|
authorization_details?: {
|
77
77
|
type: string;
|
@@ -101,7 +101,7 @@ export declare const oauthAuthorizationRequestParSchema: z.ZodUnion<[z.ZodObject
|
|
101
101
|
login_hint?: string | undefined;
|
102
102
|
ui_locales?: string | undefined;
|
103
103
|
id_token_hint?: string | undefined;
|
104
|
-
display?: "page" | "popup" | "touch" | undefined;
|
104
|
+
display?: "page" | "popup" | "touch" | "wap" | undefined;
|
105
105
|
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
106
106
|
authorization_details?: {
|
107
107
|
type: string;
|
@@ -30,7 +30,7 @@ export declare const oauthAuthorizationRequestParametersSchema: z.ZodObject<{
|
|
30
30
|
login_hint: z.ZodOptional<z.ZodString>;
|
31
31
|
ui_locales: z.ZodOptional<z.ZodString>;
|
32
32
|
id_token_hint: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>>;
|
33
|
-
display: z.ZodOptional<z.ZodEnum<["page", "popup", "touch"]>>;
|
33
|
+
display: z.ZodOptional<z.ZodEnum<["page", "popup", "touch", "wap"]>>;
|
34
34
|
/**
|
35
35
|
* - "none" will only be allowed if the user already allowed the client on the same device
|
36
36
|
* - "login" will force the user to login again, unless he very recently logged in
|
@@ -80,7 +80,7 @@ export declare const oauthAuthorizationRequestParametersSchema: z.ZodObject<{
|
|
80
80
|
login_hint?: string | undefined;
|
81
81
|
ui_locales?: string | undefined;
|
82
82
|
id_token_hint?: `${string}.${string}.${string}` | undefined;
|
83
|
-
display?: "page" | "popup" | "touch" | undefined;
|
83
|
+
display?: "page" | "popup" | "touch" | "wap" | undefined;
|
84
84
|
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
85
85
|
authorization_details?: {
|
86
86
|
type: string;
|
@@ -110,7 +110,7 @@ export declare const oauthAuthorizationRequestParametersSchema: z.ZodObject<{
|
|
110
110
|
login_hint?: string | undefined;
|
111
111
|
ui_locales?: string | undefined;
|
112
112
|
id_token_hint?: string | undefined;
|
113
|
-
display?: "page" | "popup" | "touch" | undefined;
|
113
|
+
display?: "page" | "popup" | "touch" | "wap" | undefined;
|
114
114
|
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
115
115
|
authorization_details?: {
|
116
116
|
type: string;
|
@@ -54,7 +54,7 @@ exports.oauthAuthorizationRequestParametersSchema = zod_1.z.object({
|
|
54
54
|
// Previous ID Token, should be provided when prompt=none is used
|
55
55
|
id_token_hint: jwk_1.signedJwtSchema.optional(),
|
56
56
|
// Type of UI the AS is displayed on
|
57
|
-
display: zod_1.z.enum(['page', 'popup', 'touch']).optional(),
|
57
|
+
display: zod_1.z.enum(['page', 'popup', 'touch', 'wap']).optional(),
|
58
58
|
/**
|
59
59
|
* - "none" will only be allowed if the user already allowed the client on the same device
|
60
60
|
* - "login" will force the user to login again, unless he very recently logged in
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-authorization-request-parameters.js","sourceRoot":"","sources":["../src/oauth-authorization-request-parameters.ts"],"names":[],"mappings":";;;AAAA,sCAA8C;AAC9C,6BAAuB;AAEvB,qFAAkF;AAClF,6DAA0D;AAC1D,qFAAiF;AACjF,qEAAkE;AAClE,qDAAmD;AACnD,yEAAsE;AACtE,2EAAwE;AACxE,+DAA4D;AAE5D;;GAEG;AACU,QAAA,yCAAyC,GAAG,OAAC,CAAC,MAAM,CAAC;IAChE,SAAS,EAAE,wCAAmB;IAC9B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACzC,KAAK,EAAE,iCAAgB,CAAC,QAAQ,EAAE;IAClC,aAAa,EAAE,gDAAuB;IAEtC,OAAO;IAEP,cAAc,EAAE,OAAC,CAA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AAE;IAE3C,MAAM,EAAE,OAAC;SACN,MAAM,CACL,0CAAoB,EACpB,OAAC,CAAC,MAAM,CACN,oDAAyB,EACzB,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,sDAA0B,CAAC,CAAC,CACvD,CACF;SACA,QAAQ,EAAE;IAEb,8EAA8E;IAC9E,uCAAuC;IACvC,iDAAiD;IAEjD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAExC,UAAU,EAAE,OAAC;SACV,MAAM,EAAE;SACR,KAAK,CAAC,gDAAgD,CAAC,CAAC,cAAc;SACtE,QAAQ,EAAE;IAEb,iEAAiE;IACjE,aAAa,EAAE,qBAAe,CAAC,QAAQ,EAAE;IAEzC,oCAAoC;IACpC,OAAO,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE;IAE7D;;;;;OAKG;IACH,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEzE,gDAAgD;IAChD,qBAAqB,EAAE,gEAA+B,CAAC,QAAQ,EAAE;CAClE,CAAC,CAAA"}
|
@@ -27,7 +27,7 @@ export declare const oauthAuthorizationRequestQuerySchema: z.ZodUnion<[z.ZodObje
|
|
27
27
|
login_hint: z.ZodOptional<z.ZodString>;
|
28
28
|
ui_locales: z.ZodOptional<z.ZodString>;
|
29
29
|
id_token_hint: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>>;
|
30
|
-
display: z.ZodOptional<z.ZodEnum<["page", "popup", "touch"]>>;
|
30
|
+
display: z.ZodOptional<z.ZodEnum<["page", "popup", "touch", "wap"]>>;
|
31
31
|
prompt: z.ZodOptional<z.ZodEnum<["none", "login", "consent", "select_account"]>>;
|
32
32
|
authorization_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
33
33
|
type: z.ZodString;
|
@@ -71,7 +71,7 @@ export declare const oauthAuthorizationRequestQuerySchema: z.ZodUnion<[z.ZodObje
|
|
71
71
|
login_hint?: string | undefined;
|
72
72
|
ui_locales?: string | undefined;
|
73
73
|
id_token_hint?: `${string}.${string}.${string}` | undefined;
|
74
|
-
display?: "page" | "popup" | "touch" | undefined;
|
74
|
+
display?: "page" | "popup" | "touch" | "wap" | undefined;
|
75
75
|
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
76
76
|
authorization_details?: {
|
77
77
|
type: string;
|
@@ -101,7 +101,7 @@ export declare const oauthAuthorizationRequestQuerySchema: z.ZodUnion<[z.ZodObje
|
|
101
101
|
login_hint?: string | undefined;
|
102
102
|
ui_locales?: string | undefined;
|
103
103
|
id_token_hint?: string | undefined;
|
104
|
-
display?: "page" | "popup" | "touch" | undefined;
|
104
|
+
display?: "page" | "popup" | "touch" | "wap" | undefined;
|
105
105
|
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
106
106
|
authorization_details?: {
|
107
107
|
type: string;
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
3
3
|
* @see {@link https://datatracker.ietf.org/doc/html/rfc8414}
|
4
4
|
*/
|
5
5
|
export declare const oauthAuthorizationServerMetadataSchema: z.ZodObject<{
|
6
|
-
issuer: z.ZodEffects<z.ZodString, string
|
6
|
+
issuer: z.ZodEffects<z.ZodString, `http://${string}` | `https://${string}`, string>;
|
7
7
|
claims_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
8
8
|
claims_locales_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
9
9
|
claims_parameter_supported: z.ZodOptional<z.ZodBoolean>;
|
@@ -40,7 +40,7 @@ export declare const oauthAuthorizationServerMetadataSchema: z.ZodObject<{
|
|
40
40
|
protected_resources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
41
41
|
client_id_metadata_document_supported: z.ZodOptional<z.ZodBoolean>;
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
43
|
-
issuer: string
|
43
|
+
issuer: `http://${string}` | `https://${string}`;
|
44
44
|
authorization_endpoint: string;
|
45
45
|
token_endpoint: string;
|
46
46
|
jwks_uri?: string | undefined;
|
@@ -116,7 +116,7 @@ export declare const oauthAuthorizationServerMetadataSchema: z.ZodObject<{
|
|
116
116
|
}>;
|
117
117
|
export type OAuthAuthorizationServerMetadata = z.infer<typeof oauthAuthorizationServerMetadataSchema>;
|
118
118
|
export declare const oauthAuthorizationServerMetadataValidator: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
119
|
-
issuer: z.ZodEffects<z.ZodString, string
|
119
|
+
issuer: z.ZodEffects<z.ZodString, `http://${string}` | `https://${string}`, string>;
|
120
120
|
claims_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
121
121
|
claims_locales_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
122
122
|
claims_parameter_supported: z.ZodOptional<z.ZodBoolean>;
|
@@ -153,7 +153,7 @@ export declare const oauthAuthorizationServerMetadataValidator: z.ZodEffects<z.Z
|
|
153
153
|
protected_resources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
154
154
|
client_id_metadata_document_supported: z.ZodOptional<z.ZodBoolean>;
|
155
155
|
}, "strip", z.ZodTypeAny, {
|
156
|
-
issuer: string
|
156
|
+
issuer: `http://${string}` | `https://${string}`;
|
157
157
|
authorization_endpoint: string;
|
158
158
|
token_endpoint: string;
|
159
159
|
jwks_uri?: string | undefined;
|
@@ -227,7 +227,7 @@ export declare const oauthAuthorizationServerMetadataValidator: z.ZodEffects<z.Z
|
|
227
227
|
protected_resources?: string[] | undefined;
|
228
228
|
client_id_metadata_document_supported?: boolean | undefined;
|
229
229
|
}>, {
|
230
|
-
issuer: string
|
230
|
+
issuer: `http://${string}` | `https://${string}`;
|
231
231
|
authorization_endpoint: string;
|
232
232
|
token_endpoint: string;
|
233
233
|
jwks_uri?: string | undefined;
|
@@ -301,7 +301,7 @@ export declare const oauthAuthorizationServerMetadataValidator: z.ZodEffects<z.Z
|
|
301
301
|
protected_resources?: string[] | undefined;
|
302
302
|
client_id_metadata_document_supported?: boolean | undefined;
|
303
303
|
}>, {
|
304
|
-
issuer: string
|
304
|
+
issuer: `http://${string}` | `https://${string}`;
|
305
305
|
authorization_endpoint: string;
|
306
306
|
token_endpoint: string;
|
307
307
|
jwks_uri?: string | undefined;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.isOAuthClientIdDiscoverable = isOAuthClientIdDiscoverable;
|
4
|
+
exports.assertOAuthDiscoverableClientId = assertOAuthDiscoverableClientId;
|
5
|
+
exports.parseOAuthDiscoverableClientId = parseOAuthDiscoverableClientId;
|
4
6
|
const util_js_1 = require("./util.js");
|
5
7
|
function isOAuthClientIdDiscoverable(clientId) {
|
6
8
|
try {
|
@@ -11,11 +13,9 @@ function isOAuthClientIdDiscoverable(clientId) {
|
|
11
13
|
return false;
|
12
14
|
}
|
13
15
|
}
|
14
|
-
exports.isOAuthClientIdDiscoverable = isOAuthClientIdDiscoverable;
|
15
16
|
function assertOAuthDiscoverableClientId(value) {
|
16
17
|
void parseOAuthDiscoverableClientId(value);
|
17
18
|
}
|
18
|
-
exports.assertOAuthDiscoverableClientId = assertOAuthDiscoverableClientId;
|
19
19
|
function parseOAuthDiscoverableClientId(clientId) {
|
20
20
|
const url = new URL(clientId);
|
21
21
|
if (url.protocol !== 'https:') {
|
@@ -47,5 +47,4 @@ function parseOAuthDiscoverableClientId(clientId) {
|
|
47
47
|
}
|
48
48
|
return url;
|
49
49
|
}
|
50
|
-
exports.parseOAuthDiscoverableClientId = parseOAuthDiscoverableClientId;
|
51
50
|
//# sourceMappingURL=oauth-client-id-discoverable.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-client-id-discoverable.js","sourceRoot":"","sources":["../src/oauth-client-id-discoverable.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"oauth-client-id-discoverable.js","sourceRoot":"","sources":["../src/oauth-client-id-discoverable.ts"],"names":[],"mappings":";;AAQA,kEASC;AAED,0EAIC;AAED,wEA2CC;AAnED,uCAAwD;AAOxD,SAAgB,2BAA2B,CACzC,QAAgB;IAEhB,IAAI,CAAC;QACH,8BAA8B,CAAC,QAAQ,CAAC,CAAA;QACxC,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AAED,SAAgB,+BAA+B,CAC7C,KAAa;IAEb,KAAK,8BAA8B,CAAC,KAAK,CAAC,CAAA;AAC5C,CAAC;AAED,SAAgB,8BAA8B,CAAC,QAAgB;IAC7D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAA;IAE7B,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,yCAAyC,CAAC,CAAA;IAChE,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;QACjC,MAAM,IAAI,SAAS,CAAC,uCAAuC,CAAC,CAAA;IAC9D,CAAC;IAED,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;IAC7D,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,KAAK,WAAW,EAAE,CAAC;QACjC,MAAM,IAAI,SAAS,CAAC,2CAA2C,CAAC,CAAA;IAClE,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,KAAK,GAAG,EAAE,CAAC;QACzB,MAAM,IAAI,SAAS,CACjB,uEAAuE,CACxE,CAAA;IACH,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,SAAS,CAAC,kDAAkD,CAAC,CAAA;IACzE,CAAC;IAED,IAAI,IAAA,sBAAY,EAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAA;IACpE,CAAC;IAED,yEAAyE;IACzE,wEAAwE;IACxE,8EAA8E;IAC9E,IAAI,IAAA,wBAAc,EAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC9C,MAAM,IAAI,SAAS,CACjB,wCAAwC,GAAG,CAAC,IAAI,WAAW,QAAQ,IAAI,CACxE,CAAA;IACH,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.isOAuthClientIdLoopback = isOAuthClientIdLoopback;
|
4
|
+
exports.assertOAuthLoopbackClientId = assertOAuthLoopbackClientId;
|
5
|
+
exports.parseOAuthLoopbackClientId = parseOAuthLoopbackClientId;
|
4
6
|
const oauth_scope_js_1 = require("./oauth-scope.js");
|
5
7
|
const util_js_1 = require("./util.js");
|
6
8
|
const OAUTH_CLIENT_ID_LOOPBACK_URL = 'http://localhost';
|
@@ -13,11 +15,9 @@ function isOAuthClientIdLoopback(clientId) {
|
|
13
15
|
return false;
|
14
16
|
}
|
15
17
|
}
|
16
|
-
exports.isOAuthClientIdLoopback = isOAuthClientIdLoopback;
|
17
18
|
function assertOAuthLoopbackClientId(clientId) {
|
18
19
|
void parseOAuthLoopbackClientId(clientId);
|
19
20
|
}
|
20
|
-
exports.assertOAuthLoopbackClientId = assertOAuthLoopbackClientId;
|
21
21
|
// @TODO: should we turn this into a zod schema? (more coherent error with other
|
22
22
|
// validation functions)
|
23
23
|
function parseOAuthLoopbackClientId(clientId) {
|
@@ -77,5 +77,4 @@ function parseOAuthLoopbackClientId(clientId) {
|
|
77
77
|
redirect_uris,
|
78
78
|
};
|
79
79
|
}
|
80
|
-
exports.parseOAuthLoopbackClientId = parseOAuthLoopbackClientId;
|
81
80
|
//# sourceMappingURL=oauth-client-id-loopback.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-client-id-loopback.js","sourceRoot":"","sources":["../src/oauth-client-id-loopback.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"oauth-client-id-loopback.js","sourceRoot":"","sources":["../src/oauth-client-id-loopback.ts"],"names":[],"mappings":";;AASA,0DASC;AAED,kEAIC;AAID,gEA6EC;AAxGD,qDAA+D;AAC/D,uCAAmD;AAEnD,MAAM,4BAA4B,GAAG,kBAAkB,CAAA;AAKvD,SAAgB,uBAAuB,CACrC,QAAgB;IAEhB,IAAI,CAAC;QACH,0BAA0B,CAAC,QAAQ,CAAC,CAAA;QACpC,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AAED,SAAgB,2BAA2B,CACzC,QAAgB;IAEhB,KAAK,0BAA0B,CAAC,QAAQ,CAAC,CAAA;AAC3C,CAAC;AAED,gFAAgF;AAChF,wBAAwB;AACxB,SAAgB,0BAA0B,CAAC,QAAgB;IAIzD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC;QACvD,MAAM,IAAI,SAAS,CACjB,sCAAsC,4BAA4B,GAAG,CACtE,CAAA;IACH,CAAC;SAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,4BAA4B,CAAC,MAAM,CAAC,EAAE,CAAC;QACvE,MAAM,IAAI,SAAS,CAAC,qDAAqD,CAAC,CAAA;IAC5E,CAAC;IAED,MAAM,cAAc,GAClB,QAAQ,CAAC,MA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