@authup/server-core 1.0.0-beta.49 → 1.0.0-beta.50
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/dist/adapters/database/domains/client/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/client/entity.mjs +4 -2
- package/dist/adapters/database/domains/client/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/client-permission/entity.d.ts +2 -2
- package/dist/adapters/database/domains/client-permission/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/client-permission/entity.mjs +4 -2
- package/dist/adapters/database/domains/client-permission/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/client-role/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/client-role/entity.mjs +4 -2
- package/dist/adapters/database/domains/client-role/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/client-scope/entity.d.ts +2 -2
- package/dist/adapters/database/domains/client-scope/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/client-scope/entity.mjs +4 -2
- package/dist/adapters/database/domains/client-scope/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider/entity.mjs +4 -2
- package/dist/adapters/database/domains/identity-provider/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider-account/entity.d.ts +2 -2
- package/dist/adapters/database/domains/identity-provider-account/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider-account/entity.mjs +4 -2
- package/dist/adapters/database/domains/identity-provider-account/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider-attribute/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider-attribute/entity.mjs +4 -2
- package/dist/adapters/database/domains/identity-provider-attribute/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider-attribute-mapping/entity.d.ts +2 -2
- package/dist/adapters/database/domains/identity-provider-attribute-mapping/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider-attribute-mapping/entity.mjs +4 -2
- package/dist/adapters/database/domains/identity-provider-attribute-mapping/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider-permission-mapping/entity.d.ts +2 -2
- package/dist/adapters/database/domains/identity-provider-permission-mapping/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider-permission-mapping/entity.mjs +4 -2
- package/dist/adapters/database/domains/identity-provider-permission-mapping/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider-role-mapping/entity.d.ts +2 -2
- package/dist/adapters/database/domains/identity-provider-role-mapping/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider-role-mapping/entity.mjs +4 -2
- package/dist/adapters/database/domains/identity-provider-role-mapping/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/key/entity.d.ts +2 -2
- package/dist/adapters/database/domains/key/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/key/entity.mjs +4 -2
- package/dist/adapters/database/domains/key/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/permission/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/permission/entity.mjs +4 -2
- package/dist/adapters/database/domains/permission/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/permission-policy/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/permission-policy/entity.mjs +4 -2
- package/dist/adapters/database/domains/permission-policy/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/policy/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/policy/entity.mjs +4 -2
- package/dist/adapters/database/domains/policy/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/policy-attribute/entity.d.ts +2 -2
- package/dist/adapters/database/domains/policy-attribute/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/policy-attribute/entity.mjs +4 -2
- package/dist/adapters/database/domains/policy-attribute/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/realm/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/realm/entity.mjs +4 -2
- package/dist/adapters/database/domains/realm/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/robot/entity.d.ts +2 -2
- package/dist/adapters/database/domains/robot/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/robot/entity.mjs +4 -2
- package/dist/adapters/database/domains/robot/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/robot-permission/entity.d.ts +2 -2
- package/dist/adapters/database/domains/robot-permission/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/robot-permission/entity.mjs +4 -2
- package/dist/adapters/database/domains/robot-permission/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/robot-role/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/robot-role/entity.mjs +4 -2
- package/dist/adapters/database/domains/robot-role/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/role/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/role/entity.mjs +4 -2
- package/dist/adapters/database/domains/role/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/role-attribute/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/role-attribute/entity.mjs +4 -2
- package/dist/adapters/database/domains/role-attribute/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/role-permission/entity.d.ts +2 -2
- package/dist/adapters/database/domains/role-permission/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/role-permission/entity.mjs +4 -2
- package/dist/adapters/database/domains/role-permission/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/scope/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/scope/entity.mjs +4 -2
- package/dist/adapters/database/domains/scope/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/session/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/session/entity.mjs +4 -2
- package/dist/adapters/database/domains/session/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/user/entity.d.ts +2 -2
- package/dist/adapters/database/domains/user/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/user/entity.mjs +4 -2
- package/dist/adapters/database/domains/user/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/user-attribute/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/user-attribute/entity.mjs +4 -2
- package/dist/adapters/database/domains/user-attribute/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/user-permission/entity.d.ts +2 -2
- package/dist/adapters/database/domains/user-permission/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/user-permission/entity.mjs +4 -2
- package/dist/adapters/database/domains/user-permission/entity.mjs.map +1 -1
- package/dist/adapters/database/domains/user-role/entity.d.ts.map +1 -1
- package/dist/adapters/database/domains/user-role/entity.mjs +4 -2
- package/dist/adapters/database/domains/user-role/entity.mjs.map +1 -1
- package/dist/adapters/database/helpers/date.d.ts +14 -0
- package/dist/adapters/database/helpers/date.d.ts.map +1 -0
- package/dist/adapters/database/helpers/date.mjs +26 -0
- package/dist/adapters/database/helpers/date.mjs.map +1 -0
- package/dist/adapters/database/helpers/index.d.ts +1 -0
- package/dist/adapters/database/helpers/index.d.ts.map +1 -1
- package/dist/adapters/database/helpers/index.mjs +2 -1
- package/dist/adapters/database/index.mjs +4 -3
- package/dist/adapters/http/controllers/entities/identity-provider/module.mjs +1 -1
- package/dist/adapters/http/controllers/workflows/openid/module.d.ts +2 -2
- package/dist/adapters/http/controllers/workflows/openid/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/openid/module.mjs +13 -31
- package/dist/adapters/http/controllers/workflows/openid/module.mjs.map +1 -1
- package/dist/app/modules/database/module.mjs +1 -1
- package/dist/app/modules/database/repositories/client/repository.mjs +1 -1
- package/dist/app/modules/database/repositories/realm/repository.mjs +1 -1
- package/dist/app/modules/database/repositories/robot/repository.mjs +1 -1
- package/dist/app/modules/database/repositories/user/repository.mjs +1 -1
- package/dist/app/modules/identity/repositories/client.mjs +1 -1
- package/dist/app/modules/identity/repositories/robot.mjs +1 -1
- package/dist/app/modules/identity/repositories/user.mjs +1 -1
- package/dist/app/modules/oauth2/repositories/authorize/state/repository.mjs +1 -1
- package/dist/app/modules/provisioning/sources/default/module.mjs +1 -1
- package/dist/core/authentication/credential/entities/client/module.mjs +1 -1
- package/dist/core/authentication/credential/entities/robot/module.mjs +1 -1
- package/dist/core/entities/client/service.mjs +1 -1
- package/dist/core/entities/client-permission/service.mjs +1 -1
- package/dist/core/entities/client-role/service.mjs +1 -1
- package/dist/core/entities/client-scope/service.mjs +1 -1
- package/dist/core/entities/identity-provider-role-mapping/service.mjs +1 -1
- package/dist/core/entities/permission/service.mjs +1 -1
- package/dist/core/entities/permission-policy/service.mjs +1 -1
- package/dist/core/entities/policy/service.mjs +1 -1
- package/dist/core/entities/realm/service.mjs +1 -1
- package/dist/core/entities/robot/service.mjs +1 -1
- package/dist/core/entities/robot-permission/service.mjs +1 -1
- package/dist/core/entities/robot-role/service.mjs +1 -1
- package/dist/core/entities/role/service.mjs +1 -1
- package/dist/core/entities/role-permission/service.mjs +1 -1
- package/dist/core/entities/scope/service.mjs +1 -1
- package/dist/core/entities/user/service.mjs +1 -1
- package/dist/core/entities/user-permission/service.mjs +1 -1
- package/dist/core/entities/user-role/service.mjs +1 -1
- package/dist/core/identity/provider/account/module.mjs +1 -1
- package/dist/core/identity/registration/service.mjs +1 -1
- package/dist/core/identity/resolver/module.mjs +1 -1
- package/dist/core/oauth2/authorization/code-request/verifier/module.mjs +1 -1
- package/dist/core/oauth2/openid/claims.d.ts.map +1 -1
- package/dist/core/oauth2/openid/claims.mjs +0 -3
- package/dist/core/oauth2/openid/claims.mjs.map +1 -1
- package/dist/core/oauth2/scope/resolver.mjs +1 -1
- package/dist/core/provisioning/synchronizer/user/module.mjs +1 -1
- package/dist/index.mjs +3 -2
- package/dist/swagger.json +94 -139
- package/dist/ui/client/.vite/ssr-manifest.json +1113 -627
- package/dist/ui/client/assets/index-BFXs98mu.js +102 -0
- package/dist/ui/client/assets/index-C_-HM1P-.css +2 -0
- package/dist/ui/client/index.html +2 -2
- package/dist/ui/server/assets/multipart-parser-Dn2Ly9xU.js +171 -0
- package/dist/ui/server/assets/{multipart-parser-C4ws2efo.js → multipart-parser-DyM9gi59.js} +1 -1
- package/dist/ui/server/server.js +85678 -66809
- package/package.json +44 -44
- package/dist/ui/client/assets/index-BDM2dsWN.js +0 -102
- package/dist/ui/client/assets/index-BeXJgvKE.css +0 -2
|
@@ -3,8 +3,9 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { resolveURL } from "../../../../../utils/url.mjs";
|
|
5
5
|
import "../../../../../utils/index.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { REALM_MASTER_NAME } from "@authup/core-kit";
|
|
7
|
+
import { sendRedirect } from "routup";
|
|
8
|
+
import { DContext, DController, DGet } from "@routup/decorators";
|
|
8
9
|
//#region src/adapters/http/controllers/workflows/openid/module.ts
|
|
9
10
|
function _ts_decorate(decorators, target, key, desc) {
|
|
10
11
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -15,45 +16,26 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
15
16
|
function _ts_metadata(k, v) {
|
|
16
17
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
17
18
|
}
|
|
19
|
+
function _ts_param(paramIndex, decorator) {
|
|
20
|
+
return function(target, key) {
|
|
21
|
+
decorator(target, key, paramIndex);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
18
24
|
var OpenIDController = class {
|
|
19
25
|
options;
|
|
20
26
|
constructor(options) {
|
|
21
27
|
this.options = options;
|
|
22
28
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
issuer: baseURL,
|
|
27
|
-
authorization_endpoint: resolveURL(baseURL, "authorize"),
|
|
28
|
-
jwks_uri: resolveURL(baseURL, "jwks"),
|
|
29
|
-
response_types_supported: [
|
|
30
|
-
OAuth2AuthorizationResponseType.CODE,
|
|
31
|
-
OAuth2AuthorizationResponseType.TOKEN,
|
|
32
|
-
OAuth2AuthorizationResponseType.NONE
|
|
33
|
-
],
|
|
34
|
-
subject_types_supported: ["public"],
|
|
35
|
-
id_token_signing_alg_values_supported: [
|
|
36
|
-
"HS256",
|
|
37
|
-
"HS384",
|
|
38
|
-
"HS512",
|
|
39
|
-
"RS256",
|
|
40
|
-
"RS384",
|
|
41
|
-
"RS512",
|
|
42
|
-
"none"
|
|
43
|
-
],
|
|
44
|
-
token_endpoint: resolveURL(baseURL, "token"),
|
|
45
|
-
introspection_endpoint: resolveURL(baseURL, "token/introspect"),
|
|
46
|
-
revocation_endpoint: resolveURL(baseURL, "token"),
|
|
47
|
-
service_documentation: "https://authup.org/",
|
|
48
|
-
userinfo_endpoint: resolveURL(baseURL, "users/@me")
|
|
49
|
-
};
|
|
29
|
+
getOpenIdConfiguration(event) {
|
|
30
|
+
return sendRedirect(event, resolveURL(this.options.baseURL, `realms/${REALM_MASTER_NAME}/.well-known/openid-configuration`));
|
|
50
31
|
}
|
|
51
32
|
};
|
|
52
33
|
_ts_decorate([
|
|
53
34
|
DGet("/.well-known/openid-configuration", []),
|
|
35
|
+
_ts_param(0, DContext()),
|
|
54
36
|
_ts_metadata("design:type", Function),
|
|
55
|
-
_ts_metadata("design:paramtypes", []),
|
|
56
|
-
_ts_metadata("design:returntype",
|
|
37
|
+
_ts_metadata("design:paramtypes", [typeof IAppEvent === "undefined" ? Object : IAppEvent]),
|
|
38
|
+
_ts_metadata("design:returntype", void 0)
|
|
57
39
|
], OpenIDController.prototype, "getOpenIdConfiguration", null);
|
|
58
40
|
OpenIDController = _ts_decorate([
|
|
59
41
|
DController(""),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.mjs","names":["
|
|
1
|
+
{"version":3,"file":"module.mjs","names":["REALM_MASTER_NAME","DContext","DController","DGet","sendRedirect","resolveURL","OpenIDController","options","getOpenIdConfiguration","event","baseURL"],"sources":["../../../../../../src/adapters/http/controllers/workflows/openid/module.ts"],"sourcesContent":["/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { REALM_MASTER_NAME } from '@authup/core-kit';\nimport {\n DContext,\n DController,\n DGet,\n} from '@routup/decorators';\nimport type { IAppEvent } from 'routup';\nimport { sendRedirect } from 'routup';\nimport { resolveURL } from '../../../../../utils/index.ts';\n\nexport type OpenIDControllerOptions = {\n baseURL: string\n};\n\n@DController('')\nexport class OpenIDController {\n protected options: OpenIDControllerOptions;\n\n constructor(options: OpenIDControllerOptions) {\n this.options = options;\n }\n\n @DGet('/.well-known/openid-configuration', [])\n getOpenIdConfiguration(@DContext() event: IAppEvent) {\n // A single global discovery doc can't satisfy OIDC Discovery §4.3 /\n // RFC 8414 §3.3: tokens are issued per realm (iss=<baseURL>/realms/<name>),\n // so a global `issuer` would never match the `iss` of any token.\n // Redirect to the master realm's realm-scoped, conformant doc.\n // ponytail: master is the default realm; swap REALM_MASTER_NAME for a\n // config key if a deployment ever needs a different default.\n return sendRedirect(\n event,\n resolveURL(this.options.baseURL, `realms/${REALM_MASTER_NAME}/.well-known/openid-configuration`),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAaM,mBAAb,MAAaA;CACCC;CAEV,YAAYA,SAAkC;EAC1C,KAAKA,UAAUA;CACnB;CAGAC,uBAAuB,OAA8B;EAOjD,OAAOJ,aACHK,OACAJ,WAAW,KAAKE,QAAQG,SAAS,UAAUV,kBAAkB,kCAAkC,CAAA;CAEvG;AACJ"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { isDatabaseTypeSupported, isDatabaseTypeSupportedForEnvironment } from "../../../adapters/database/helpers/is-supported.mjs";
|
|
4
5
|
import { EntitySubscriber } from "../../../adapters/database/subscriber/module.mjs";
|
|
5
6
|
import { CacheInjectionKey } from "../cache/constants.mjs";
|
|
6
7
|
import { ModuleName } from "../constants.mjs";
|
|
@@ -10,7 +11,6 @@ import "../cache/index.mjs";
|
|
|
10
11
|
import { DatabaseInjectionKey } from "./constants.mjs";
|
|
11
12
|
import { DatabaseQueryResultCache } from "../../../adapters/database/cache/module.mjs";
|
|
12
13
|
import { DataSourceOptionsBuilder } from "../../../adapters/database/data-source/options/module.mjs";
|
|
13
|
-
import { isDatabaseTypeSupported, isDatabaseTypeSupportedForEnvironment } from "../../../adapters/database/helpers/is-supported.mjs";
|
|
14
14
|
import "../../../adapters/database/index.mjs";
|
|
15
15
|
import { LoggerInjectionKey } from "../logger/constants.mjs";
|
|
16
16
|
import "../logger/index.mjs";
|
|
@@ -11,8 +11,8 @@ import "../../../../../adapters/database/index.mjs";
|
|
|
11
11
|
import { translateWhereConditions } from "../helpers.mjs";
|
|
12
12
|
import { loadBoundPermissions } from "../bindings.mjs";
|
|
13
13
|
import { RealmRepositoryAdapter } from "../realm/repository.mjs";
|
|
14
|
-
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
15
14
|
import { isUUID } from "@authup/kit";
|
|
15
|
+
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
16
16
|
import { applyQuery, isEntityUnique, validateEntityJoinColumns } from "typeorm-extension";
|
|
17
17
|
//#region src/app/modules/database/repositories/client/repository.ts
|
|
18
18
|
var ClientRepositoryAdapter = class {
|
|
@@ -4,8 +4,8 @@ import.meta.url;
|
|
|
4
4
|
import { RealmEntity } from "../../../../../adapters/database/domains/realm/entity.mjs";
|
|
5
5
|
import "../../../../../adapters/database/domains/index.mjs";
|
|
6
6
|
import { translateWhereConditions } from "../helpers.mjs";
|
|
7
|
-
import { REALM_MASTER_NAME } from "@authup/core-kit";
|
|
8
7
|
import { isUUID } from "@authup/kit";
|
|
8
|
+
import { REALM_MASTER_NAME } from "@authup/core-kit";
|
|
9
9
|
import { applyQuery, validateEntityJoinColumns } from "typeorm-extension";
|
|
10
10
|
//#region src/app/modules/database/repositories/realm/repository.ts
|
|
11
11
|
var RealmRepositoryAdapter = class {
|
|
@@ -11,8 +11,8 @@ import "../../../../../adapters/database/index.mjs";
|
|
|
11
11
|
import { translateWhereConditions } from "../helpers.mjs";
|
|
12
12
|
import { loadBoundPermissions } from "../bindings.mjs";
|
|
13
13
|
import { RealmRepositoryAdapter } from "../realm/repository.mjs";
|
|
14
|
-
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
15
14
|
import { isUUID } from "@authup/kit";
|
|
15
|
+
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
16
16
|
import { applyQuery, isEntityUnique, validateEntityJoinColumns } from "typeorm-extension";
|
|
17
17
|
//#region src/app/modules/database/repositories/robot/repository.ts
|
|
18
18
|
var RobotRepositoryAdapter = class {
|
|
@@ -11,8 +11,8 @@ import "../../../../../adapters/database/index.mjs";
|
|
|
11
11
|
import { translateWhereConditions } from "../helpers.mjs";
|
|
12
12
|
import { loadBoundPermissions } from "../bindings.mjs";
|
|
13
13
|
import { RealmRepositoryAdapter } from "../realm/repository.mjs";
|
|
14
|
-
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
15
14
|
import { isUUID } from "@authup/kit";
|
|
15
|
+
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
16
16
|
import { applyQuery, isEntityUnique, validateEntityJoinColumns } from "typeorm-extension";
|
|
17
17
|
//#region src/app/modules/database/repositories/user/repository.ts
|
|
18
18
|
var UserRepositoryAdapter = class {
|
|
@@ -3,8 +3,8 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { CachePrefix } from "../../../../adapters/database/domains/constants.mjs";
|
|
5
5
|
import "../../../../adapters/database/domains/index.mjs";
|
|
6
|
-
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
7
6
|
import { isUUID } from "@authup/kit";
|
|
7
|
+
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
8
8
|
//#region src/app/modules/identity/repositories/client.ts
|
|
9
9
|
var ClientIdentityRepository = class {
|
|
10
10
|
repository;
|
|
@@ -3,8 +3,8 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { CachePrefix } from "../../../../adapters/database/domains/constants.mjs";
|
|
5
5
|
import "../../../../adapters/database/domains/index.mjs";
|
|
6
|
-
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
7
6
|
import { isUUID } from "@authup/kit";
|
|
7
|
+
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
8
8
|
//#region src/app/modules/identity/repositories/robot.ts
|
|
9
9
|
var RobotIdentityRepository = class {
|
|
10
10
|
repository;
|
|
@@ -6,8 +6,8 @@ import "../../../../adapters/database/domains/index.mjs";
|
|
|
6
6
|
import { IdentityProviderMapperOperation } from "../../../../core/identity/provider/mapper/constants.mjs";
|
|
7
7
|
import "../../../../core/index.mjs";
|
|
8
8
|
import { In } from "typeorm";
|
|
9
|
-
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
10
9
|
import { isUUID } from "@authup/kit";
|
|
10
|
+
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
11
11
|
//#region src/app/modules/identity/repositories/user.ts
|
|
12
12
|
var UserIdentityRepository = class {
|
|
13
13
|
repository;
|
|
@@ -2,8 +2,8 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { CacheOAuth2Prefix } from "../../constants.mjs";
|
|
5
|
-
import { buildCacheKey } from "@authup/server-kit";
|
|
6
5
|
import { createNanoID } from "@authup/kit";
|
|
6
|
+
import { buildCacheKey } from "@authup/server-kit";
|
|
7
7
|
//#region src/app/modules/oauth2/repositories/authorize/state/repository.ts
|
|
8
8
|
var OAuth2AuthorizationStateRepository = class {
|
|
9
9
|
cache;
|
|
@@ -9,8 +9,8 @@ import "../../../../../core/provisioning/strategy/index.mjs";
|
|
|
9
9
|
import "../../../../../core/index.mjs";
|
|
10
10
|
import { ConfigInjectionKey } from "../../../config/constants.mjs";
|
|
11
11
|
import "../../../config/index.mjs";
|
|
12
|
-
import { PermissionName, REALM_MASTER_NAME, ROLE_ADMIN_NAME, ROLE_REALM_ADMIN_NAME, ScopeName, buildUserFakeEmail } from "@authup/core-kit";
|
|
13
12
|
import { DecisionStrategy } from "@authup/kit";
|
|
13
|
+
import { PermissionName, REALM_MASTER_NAME, ROLE_ADMIN_NAME, ROLE_REALM_ADMIN_NAME, ScopeName, buildUserFakeEmail } from "@authup/core-kit";
|
|
14
14
|
import { BuiltInPolicyType, SystemPolicyName } from "@authup/access";
|
|
15
15
|
//#region src/app/modules/provisioning/sources/default/module.ts
|
|
16
16
|
var DefaultProvisioningSource = class {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import { compare, hash } from "@authup/server-kit";
|
|
5
4
|
import { createNanoID, isBCryptHash } from "@authup/kit";
|
|
5
|
+
import { compare, hash } from "@authup/server-kit";
|
|
6
6
|
//#region src/core/authentication/credential/entities/client/module.ts
|
|
7
7
|
var ClientCredentialsService = class {
|
|
8
8
|
async verify(input, entity) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import { compare, hash } from "@authup/server-kit";
|
|
5
4
|
import { createNanoID } from "@authup/kit";
|
|
5
|
+
import { compare, hash } from "@authup/server-kit";
|
|
6
6
|
//#region src/core/authentication/credential/entities/robot/module.ts
|
|
7
7
|
var RobotCredentialsService = class {
|
|
8
8
|
async verify(input, entity) {
|
|
@@ -2,9 +2,9 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { ClientCredentialsService } from "../../authentication/credential/entities/client/module.mjs";
|
|
5
|
+
import { ValidatorGroup, isUUID } from "@authup/kit";
|
|
5
6
|
import { CLIENT_RESERVED_NAMES, ClientValidator, PermissionName } from "@authup/core-kit";
|
|
6
7
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
7
|
-
import { ValidatorGroup, isUUID } from "@authup/kit";
|
|
8
8
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
9
9
|
import { BadRequestError, EntityNotFoundError } from "@authup/errors";
|
|
10
10
|
//#region src/core/entities/client/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup } from "@authup/kit";
|
|
4
5
|
import { ClientPermissionValidator, PermissionName } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
8
8
|
import { EntityConflictError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/client-permission/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup } from "@authup/kit";
|
|
4
5
|
import { ClientRoleValidator, PermissionName } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PermissionError, PolicyData } from "@authup/access";
|
|
8
8
|
import { EntityConflictError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/client-role/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup } from "@authup/kit";
|
|
4
5
|
import { ClientScopeValidator, PermissionName } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
8
8
|
import { EntityConflictError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/client-scope/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup } from "@authup/kit";
|
|
4
5
|
import { IdentityProviderRoleMappingValidator, PermissionName } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PermissionError, PolicyData } from "@authup/access";
|
|
8
8
|
import { BadRequestError, EntityConflictError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/identity-provider-role-mapping/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup, isPropertySet, isUUID } from "@authup/kit";
|
|
4
5
|
import { PermissionName, PermissionValidator, ROLE_ADMIN_NAME, ROLE_REALM_ADMIN_NAME } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup, isPropertySet, isUUID } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PolicyData, SystemPolicyName } from "@authup/access";
|
|
8
8
|
import { AuthupError, BadRequestError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/permission/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup } from "@authup/kit";
|
|
4
5
|
import { PermissionName, PermissionPolicyValidator } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
8
8
|
import { EntityConflictError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/permission-policy/service.ts
|
|
@@ -2,9 +2,9 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { PolicyAttributesValidator } from "./attributes-validator.mjs";
|
|
5
|
+
import { ValidatorGroup, extendObject, isPropertySet, isUUID, removeObjectProperty } from "@authup/kit";
|
|
5
6
|
import { PermissionName, PolicyValidator } from "@authup/core-kit";
|
|
6
7
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
7
|
-
import { ValidatorGroup, extendObject, isPropertySet, isUUID, removeObjectProperty } from "@authup/kit";
|
|
8
8
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
9
9
|
import { BadRequestError, EntityNotFoundError } from "@authup/errors";
|
|
10
10
|
//#region src/core/entities/policy/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup, isPropertySet, isUUID } from "@authup/kit";
|
|
4
5
|
import { PermissionName, REALM_MASTER_NAME, RealmValidator } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup, isPropertySet, isUUID } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
8
8
|
import { BadRequestError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/realm/service.ts
|
|
@@ -2,9 +2,9 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { RobotCredentialsService } from "../../authentication/credential/entities/robot/module.mjs";
|
|
5
|
+
import { ValidatorGroup, isUUID } from "@authup/kit";
|
|
5
6
|
import { PermissionName, RobotValidator } from "@authup/core-kit";
|
|
6
7
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
7
|
-
import { ValidatorGroup, isUUID } from "@authup/kit";
|
|
8
8
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
9
9
|
import { EntityNotFoundError } from "@authup/errors";
|
|
10
10
|
//#region src/core/entities/robot/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup } from "@authup/kit";
|
|
4
5
|
import { PermissionName, RobotPermissionValidator } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
8
8
|
import { EntityConflictError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/robot-permission/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup } from "@authup/kit";
|
|
4
5
|
import { PermissionName, RobotRoleValidator } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PermissionError, PolicyData } from "@authup/access";
|
|
8
8
|
import { EntityConflictError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/robot-role/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup, isPropertySet, isUUID } from "@authup/kit";
|
|
4
5
|
import { PermissionName, ROLE_ADMIN_NAME, RoleValidator } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup, isPropertySet, isUUID } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
8
8
|
import { BadRequestError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/role/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup } from "@authup/kit";
|
|
4
5
|
import { PermissionName, ROLE_ADMIN_NAME, RolePermissionValidator } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
8
8
|
import { EntityConflictError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/role-permission/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup, isPropertySet, isUUID } from "@authup/kit";
|
|
4
5
|
import { PermissionName, ScopeValidator } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup, isPropertySet, isUUID } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
8
8
|
import { EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/scope/service.ts
|
|
@@ -2,9 +2,9 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { UserCredentialsService } from "../../authentication/credential/entities/user/module.mjs";
|
|
5
|
+
import { ValidatorGroup, isUUID } from "@authup/kit";
|
|
5
6
|
import { PermissionName, UserValidator } from "@authup/core-kit";
|
|
6
7
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
7
|
-
import { ValidatorGroup, isUUID } from "@authup/kit";
|
|
8
8
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
9
9
|
import { BadRequestError, EntityNotFoundError } from "@authup/errors";
|
|
10
10
|
//#region src/core/entities/user/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup } from "@authup/kit";
|
|
4
5
|
import { PermissionName, UserPermissionValidator } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PolicyData } from "@authup/access";
|
|
8
8
|
import { EntityConflictError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/user-permission/service.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
+
import { ValidatorGroup } from "@authup/kit";
|
|
4
5
|
import { PermissionName, UserRoleValidator } from "@authup/core-kit";
|
|
5
6
|
import { AbstractEntityService } from "@authup/server-kit";
|
|
6
|
-
import { ValidatorGroup } from "@authup/kit";
|
|
7
7
|
import { BuiltInPolicyType, PermissionError, PolicyData } from "@authup/access";
|
|
8
8
|
import { EntityConflictError, EntityNotFoundError } from "@authup/errors";
|
|
9
9
|
//#region src/core/entities/user-role/service.ts
|
|
@@ -4,8 +4,8 @@ import.meta.url;
|
|
|
4
4
|
import { IdentityProviderIdentityOperation } from "../constants.mjs";
|
|
5
5
|
import { IdentityProviderMapperOperation } from "../mapper/constants.mjs";
|
|
6
6
|
import "../mapper/index.mjs";
|
|
7
|
-
import { UserValidator, buildUserFakeEmail, isUserFakeEmail } from "@authup/core-kit";
|
|
8
7
|
import { ValidatorGroup, createNanoID, extendObject } from "@authup/kit";
|
|
8
|
+
import { UserValidator, buildUserFakeEmail, isUserFakeEmail } from "@authup/core-kit";
|
|
9
9
|
import { isValidupError, stringifyPath } from "validup";
|
|
10
10
|
//#region src/core/identity/provider/account/module.ts
|
|
11
11
|
var IdentityProviderAccountManager = class {
|
|
@@ -5,8 +5,8 @@ import { UserCredentialsService } from "../../authentication/credential/entities
|
|
|
5
5
|
import { MailTemplateName } from "../../mail/template/types.mjs";
|
|
6
6
|
import "../../mail/index.mjs";
|
|
7
7
|
import { RegistrationDisabledError } from "./error.mjs";
|
|
8
|
-
import { UserValidator } from "@authup/core-kit";
|
|
9
8
|
import { createNanoID } from "@authup/kit";
|
|
9
|
+
import { UserValidator } from "@authup/core-kit";
|
|
10
10
|
import { BadRequestError, EntityNotFoundError } from "@authup/errors";
|
|
11
11
|
import { Container } from "validup";
|
|
12
12
|
import { randomBytes } from "node:crypto";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import { IdentityType } from "@authup/core-kit";
|
|
5
4
|
import { isUUID } from "@authup/kit";
|
|
5
|
+
import { IdentityType } from "@authup/core-kit";
|
|
6
6
|
//#region src/core/identity/resolver/module.ts
|
|
7
7
|
var IdentityResolver = class {
|
|
8
8
|
clientRepository;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import { ScopeName } from "@authup/core-kit";
|
|
5
4
|
import { isSimpleMatch } from "@authup/kit";
|
|
5
|
+
import { ScopeName } from "@authup/core-kit";
|
|
6
6
|
import { OAuth2AuthorizationResponseType, OAuth2ClientError, OAuth2GrantError, OAuth2RequestError, OAuth2ScopeError, hasOAuth2Scopes } from "@authup/specs";
|
|
7
7
|
//#region src/core/oauth2/authorization/code-request/verifier/module.ts
|
|
8
8
|
function willIssueCode(responseType) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../../../src/core/oauth2/openid/claims.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACR,MAAM,EACN,QAAQ,EACR,KAAK,EACL,IAAI,EACP,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,KAAK,iBAAiB,CAAC,CAAC,IAAI;KACvB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC;CAC/C,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,MAAM,CACrD,MAAM,kBAAkB,EAC5B,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAC7B,CAAC;AAEF,qBAAa,yBAAyB;IAClC,SAAS,CAAC,SAAS,EAAG,YAAY,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../../../src/core/oauth2/openid/claims.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACR,MAAM,EACN,QAAQ,EACR,KAAK,EACL,IAAI,EACP,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,KAAK,iBAAiB,CAAC,CAAC,IAAI;KACvB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC;CAC/C,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,MAAM,CACrD,MAAM,kBAAkB,EAC5B,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAC7B,CAAC;AAEF,qBAAa,yBAAyB;IAClC,SAAS,CAAC,SAAS,EAAG,YAAY,CAAC,MAAM,CAAC,CAcxC;IAEF,SAAS,CAAC,QAAQ,EAAG,YAAY,CAAC,KAAK,CAAC,CActC;IAEF,SAAS,CAAC,OAAO,EAAG,YAAY,CAAC,IAAI,CAAC,CAmBpC;IAEF;;;;OAIG;IACH,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAI,kBAAkB;IAYrD,UAAU,CAAC,KAAK,EAAE,MAAM,GAAI,kBAAkB;IAI9C,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAI3C,QAAQ,CAAC,KAAK,EAAE,IAAI,GAAI,kBAAkB;IAI1C,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,EACrD,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAC7B,UAAU,EAAE,CAAC,GACb,kBAAkB;CAqBzB"}
|
|
@@ -11,7 +11,6 @@ var OAuth2OpenIDClaimsBuilder = class {
|
|
|
11
11
|
preferred_username: "name",
|
|
12
12
|
updated_at: ["updated_at", (value) => {
|
|
13
13
|
if (typeof value === "string") return Math.floor(new Date(value).getTime() / 1e3);
|
|
14
|
-
if (value instanceof Date) return Math.floor(value.getTime() / 1e3);
|
|
15
14
|
return value;
|
|
16
15
|
}]
|
|
17
16
|
};
|
|
@@ -21,7 +20,6 @@ var OAuth2OpenIDClaimsBuilder = class {
|
|
|
21
20
|
preferred_username: "name",
|
|
22
21
|
updated_at: ["updated_at", (value) => {
|
|
23
22
|
if (typeof value === "string") return Math.floor(new Date(value).getTime() / 1e3);
|
|
24
|
-
if (value instanceof Date) return Math.floor(value.getTime() / 1e3);
|
|
25
23
|
return value;
|
|
26
24
|
}]
|
|
27
25
|
};
|
|
@@ -33,7 +31,6 @@ var OAuth2OpenIDClaimsBuilder = class {
|
|
|
33
31
|
preferred_username: "display_name",
|
|
34
32
|
updated_at: ["updated_at", (value) => {
|
|
35
33
|
if (typeof value === "string") return Math.floor(new Date(value).getTime() / 1e3);
|
|
36
|
-
if (value instanceof Date) return Math.floor(value.getTime() / 1e3);
|
|
37
34
|
return value;
|
|
38
35
|
}],
|
|
39
36
|
email: "email",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claims.mjs","names":["hasOwnProperty","OAuth2SubKind","OAuth2OpenIDClaimsBuilder","clientMap","name","nickname","preferred_username","updated_at","value","Math","floor","Date","getTime","robotMap","userMap","family_name","given_name","email","email_verified","fromIdentity","identity","type","CLIENT","fromClient","data","ROBOT","fromRobot","fromUser","input","extract","attributeMap","attributes","result","keys","Object","key_","attribute","key","transformer"],"sources":["../../../../src/core/oauth2/openid/claims.ts"],"sourcesContent":["/*\n * Copyright (c) 2022.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type {\n Client, \n Identity, \n Robot, \n User,\n} from '@authup/core-kit';\nimport { hasOwnProperty } from '@authup/kit';\nimport type { OpenIDTokenPayload } from '@authup/specs';\nimport { OAuth2SubKind } from '@authup/specs';\nimport type { ObjectLiteral } from 'validup';\n\ntype AttributeMapTuple<T> = {\n [K in keyof T]: [K, (value: unknown) => any]\n}[keyof T];\n\ntype AttributeMap<T extends Record<string, any>> = Record<\n keyof OpenIDTokenPayload,\nkeyof T | AttributeMapTuple<T>\n>;\n\nexport class OAuth2OpenIDClaimsBuilder {\n protected clientMap : AttributeMap<Client> = {\n name: 'name',\n nickname: 'name',\n preferred_username: 'name',\n updated_at: [\n 'updated_at',\n (value: unknown) => {\n if (typeof value === 'string') {\n return Math.floor(new Date(value).getTime() / 1000);\n }\n\n
|
|
1
|
+
{"version":3,"file":"claims.mjs","names":["hasOwnProperty","OAuth2SubKind","OAuth2OpenIDClaimsBuilder","clientMap","name","nickname","preferred_username","updated_at","value","Math","floor","Date","getTime","robotMap","userMap","family_name","given_name","email","email_verified","fromIdentity","identity","type","CLIENT","fromClient","data","ROBOT","fromRobot","fromUser","input","extract","attributeMap","attributes","result","keys","Object","key_","attribute","key","transformer"],"sources":["../../../../src/core/oauth2/openid/claims.ts"],"sourcesContent":["/*\n * Copyright (c) 2022.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type {\n Client, \n Identity, \n Robot, \n User,\n} from '@authup/core-kit';\nimport { hasOwnProperty } from '@authup/kit';\nimport type { OpenIDTokenPayload } from '@authup/specs';\nimport { OAuth2SubKind } from '@authup/specs';\nimport type { ObjectLiteral } from 'validup';\n\ntype AttributeMapTuple<T> = {\n [K in keyof T]: [K, (value: unknown) => any]\n}[keyof T];\n\ntype AttributeMap<T extends Record<string, any>> = Record<\n keyof OpenIDTokenPayload,\nkeyof T | AttributeMapTuple<T>\n>;\n\nexport class OAuth2OpenIDClaimsBuilder {\n protected clientMap : AttributeMap<Client> = {\n name: 'name',\n nickname: 'name',\n preferred_username: 'name',\n updated_at: [\n 'updated_at',\n (value: unknown) => {\n if (typeof value === 'string') {\n return Math.floor(new Date(value).getTime() / 1000);\n }\n\n return value;\n },\n ],\n };\n\n protected robotMap : AttributeMap<Robot> = {\n name: 'name',\n nickname: 'name',\n preferred_username: 'name',\n updated_at: [\n 'updated_at',\n (value: unknown) => {\n if (typeof value === 'string') {\n return Math.floor(new Date(value).getTime() / 1000);\n }\n\n return value;\n },\n ],\n };\n\n protected userMap : AttributeMap<User> = {\n name: 'name',\n family_name: 'last_name',\n given_name: 'first_name',\n nickname: 'display_name',\n preferred_username: 'display_name',\n updated_at: [\n 'updated_at',\n (value: unknown) => {\n if (typeof value === 'string') {\n return Math.floor(new Date(value).getTime() / 1000);\n }\n\n return value;\n },\n ],\n\n email: 'email',\n email_verified: 'active',\n };\n\n /**\n * Build OpenID Claims form Oauth2 Identity.\n *\n * @param identity\n */\n fromIdentity(identity: Identity) : OpenIDTokenPayload {\n if (identity.type === OAuth2SubKind.CLIENT) {\n return this.fromClient(identity.data);\n }\n\n if (identity.type === OAuth2SubKind.ROBOT) {\n return this.fromRobot(identity.data);\n }\n\n return this.fromUser(identity.data);\n }\n\n fromClient(input: Client) : OpenIDTokenPayload {\n return this.extract(this.clientMap, input);\n }\n\n fromRobot(input: Robot): OpenIDTokenPayload {\n return this.extract(this.robotMap, input);\n }\n\n fromUser(input: User) : OpenIDTokenPayload {\n return this.extract(this.userMap, input);\n }\n\n protected extract<T extends ObjectLiteral = ObjectLiteral>(\n attributeMap: AttributeMap<T>,\n attributes: T,\n ) : OpenIDTokenPayload {\n const result = {} as OpenIDTokenPayload;\n\n const keys = Object.keys(attributeMap);\n for (const key_ of keys) {\n const attribute = attributeMap[key_];\n if (typeof attribute === 'string') {\n if (hasOwnProperty(attributes, attribute)) {\n result[key_] = attributes[attribute];\n }\n } else {\n const [key, transformer] = attribute as AttributeMapTuple<T>;\n\n if (hasOwnProperty(attributes, key)) {\n result[key_] = transformer(attributes[key]);\n }\n }\n }\n\n return result;\n }\n}\n"],"mappings":";;;;;;AA2BA,IAAaE,4BAAb,MAAaA;CACCC,YAAmC;EACzCC,MAAM;EACNC,UAAU;EACVC,oBAAoB;EACpBC,YAAY,CACR,eACCC,UAAAA;GACG,IAAI,OAAOA,UAAU,UACjB,OAAOC,KAAKC,MAAM,IAAIC,KAAKH,KAAAA,CAAAA,CAAOI,QAAO,IAAK,GAAA;GAGlD,OAAOJ;EACX,CAAA;CAER;CAEUK,WAAiC;EACvCT,MAAM;EACNC,UAAU;EACVC,oBAAoB;EACpBC,YAAY,CACR,eACCC,UAAAA;GACG,IAAI,OAAOA,UAAU,UACjB,OAAOC,KAAKC,MAAM,IAAIC,KAAKH,KAAAA,CAAAA,CAAOI,QAAO,IAAK,GAAA;GAGlD,OAAOJ;EACX,CAAA;CAER;CAEUM,UAA+B;EACrCV,MAAM;EACNW,aAAa;EACbC,YAAY;EACZX,UAAU;EACVC,oBAAoB;EACpBC,YAAY,CACR,eACCC,UAAAA;GACG,IAAI,OAAOA,UAAU,UACjB,OAAOC,KAAKC,MAAM,IAAIC,KAAKH,KAAAA,CAAAA,CAAOI,QAAO,IAAK,GAAA;GAGlD,OAAOJ;EACX,CAAA;EAGJS,OAAO;EACPC,gBAAgB;CACpB;;;;;IAOAC,aAAaC,UAAyC;EAClD,IAAIA,SAASC,SAASpB,cAAcqB,QAChC,OAAO,KAAKC,WAAWH,SAASI,IAAI;EAGxC,IAAIJ,SAASC,SAASpB,cAAcwB,OAChC,OAAO,KAAKC,UAAUN,SAASI,IAAI;EAGvC,OAAO,KAAKG,SAASP,SAASI,IAAI;CACtC;CAEAD,WAAWK,OAAoC;EAC3C,OAAO,KAAKC,QAAQ,KAAK1B,WAAWyB,KAAAA;CACxC;CAEAF,UAAUE,OAAkC;EACxC,OAAO,KAAKC,QAAQ,KAAKhB,UAAUe,KAAAA;CACvC;CAEAD,SAASC,OAAkC;EACvC,OAAO,KAAKC,QAAQ,KAAKf,SAASc,KAAAA;CACtC;CAEUC,QACNC,cACAC,YACmB;EACnB,MAAMC,SAAS,CAAC;EAEhB,MAAMC,OAAOC,OAAOD,KAAKH,YAAAA;EACzB,KAAK,MAAMK,QAAQF,MAAM;GACrB,MAAMG,YAAYN,aAAaK;GAC/B,IAAI,OAAOC,cAAc;QACjBpC,eAAe+B,YAAYK,SAAAA,GAC3BJ,OAAOG,QAAQJ,WAAWK;GAAAA,OAE3B;IACH,MAAM,CAACC,KAAKC,eAAeF;IAE3B,IAAIpC,eAAe+B,YAAYM,GAAAA,GAC3BL,OAAOG,QAAQG,YAAYP,WAAWM,IAAI;GAElD;EACJ;EAEA,OAAOL;CACX;AACJ"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import { ScopeName } from "@authup/core-kit";
|
|
5
4
|
import { hasOwnProperty } from "@authup/kit";
|
|
5
|
+
import { ScopeName } from "@authup/core-kit";
|
|
6
6
|
import { OAuth2SubKind, unwrapOAuth2Scope } from "@authup/specs";
|
|
7
7
|
import { distinctArray } from "smob";
|
|
8
8
|
//#region src/core/oauth2/scope/resolver.ts
|
|
@@ -7,8 +7,8 @@ import "../../strategy/index.mjs";
|
|
|
7
7
|
import { BaseProvisioningSynchronizer } from "../base.mjs";
|
|
8
8
|
import { ProvisioningEntityResolver } from "../entity-resolver.mjs";
|
|
9
9
|
import { ProvisioningJunctionSynchronizer } from "../junction-synchronizer.mjs";
|
|
10
|
-
import { buildUserFakeEmail } from "@authup/core-kit";
|
|
11
10
|
import { pickRecord } from "@authup/kit";
|
|
11
|
+
import { buildUserFakeEmail } from "@authup/core-kit";
|
|
12
12
|
//#region src/core/provisioning/synchronizer/user/module.ts
|
|
13
13
|
var UserProvisioningSynchronizer = class extends BaseProvisioningSynchronizer {
|
|
14
14
|
userRepository;
|