chyz 1.2.5-rc.0 → 2.0.0-rc.11
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/BaseChyz.d.ts +60 -0
- package/BaseChyz.d.ts.map +1 -0
- package/BaseChyz.js +121 -82
- package/base/ActionFilter.d.ts +33 -0
- package/base/ActionFilter.d.ts.map +1 -0
- package/base/ActionFilter.js +21 -20
- package/base/BaseError.d.ts +11 -0
- package/base/BaseError.d.ts.map +1 -0
- package/base/BaseError.js +2 -6
- package/base/Behavior.d.ts +4 -0
- package/base/Behavior.d.ts.map +1 -0
- package/base/Behavior.js +2 -3
- package/base/CBaseObject.d.ts +5 -0
- package/base/CBaseObject.d.ts.map +1 -0
- package/base/CBaseObject.js +16 -0
- package/base/CRequest.d.ts +2 -0
- package/base/CRequest.d.ts.map +1 -0
- package/base/CRequest.js +10 -0
- package/base/CWebController.d.ts +44 -0
- package/base/CWebController.d.ts.map +1 -0
- package/base/CWebController.js +0 -1
- package/base/Component.d.ts +21 -0
- package/base/Component.d.ts.map +1 -0
- package/base/Component.js +7 -11
- package/base/Configurable.d.ts +3 -0
- package/base/Configurable.d.ts.map +1 -0
- package/base/Configurable.js +0 -1
- package/base/DataErrorDbException.d.ts +6 -0
- package/base/DataErrorDbException.d.ts.map +1 -0
- package/base/DataErrorDbException.js +0 -1
- package/base/DbConnection.d.ts +13 -0
- package/base/DbConnection.d.ts.map +1 -0
- package/base/DbConnection.js +1 -2
- package/base/ForbiddenHttpException.d.ts +5 -0
- package/base/ForbiddenHttpException.d.ts.map +1 -0
- package/base/ForbiddenHttpException.js +0 -1
- package/base/InvalidArgumentException.d.ts +6 -0
- package/base/InvalidArgumentException.d.ts.map +1 -0
- package/base/InvalidArgumentException.js +0 -1
- package/base/InvalidConfigException.d.ts +6 -0
- package/base/InvalidConfigException.d.ts.map +1 -0
- package/base/InvalidConfigException.js +0 -1
- package/base/Logs.d.ts +22 -0
- package/base/Logs.d.ts.map +1 -0
- package/base/Logs.js +57 -0
- package/base/Model.d.ts +299 -0
- package/base/Model.d.ts.map +1 -0
- package/base/Model.js +4 -5
- package/base/ModelManager.d.ts +2 -0
- package/base/ModelManager.d.ts.map +1 -0
- package/base/ModelManager.js +11 -1
- package/base/NotFoundHttpException.d.ts +6 -0
- package/base/NotFoundHttpException.d.ts.map +1 -0
- package/base/NotFoundHttpException.js +0 -1
- package/base/RestClient.d.ts +7 -0
- package/base/RestClient.d.ts.map +1 -0
- package/base/RestClient.js +0 -2
- package/base/UnauthorizedHttpException.d.ts +6 -0
- package/base/UnauthorizedHttpException.d.ts.map +1 -0
- package/base/UnauthorizedHttpException.js +0 -1
- package/base/ValidationHttpException.d.ts +6 -0
- package/base/ValidationHttpException.d.ts.map +1 -0
- package/base/ValidationHttpException.js +0 -1
- package/base/db/Exception.d.ts +7 -0
- package/base/db/Exception.d.ts.map +1 -0
- package/base/db/Exception.js +0 -1
- package/base/index.d.ts +19 -0
- package/base/index.d.ts.map +1 -0
- package/base/index.js +7 -6
- package/decorator/Middleware.d.ts +4 -0
- package/decorator/Middleware.d.ts.map +1 -0
- package/decorator/Middleware.js +0 -1
- package/decorator/controller.d.ts +3 -0
- package/decorator/controller.d.ts.map +1 -0
- package/decorator/controller.js +0 -1
- package/decorator/enums/ControllerDecoratorParams.d.ts +6 -0
- package/decorator/enums/ControllerDecoratorParams.d.ts.map +1 -0
- package/decorator/enums/ControllerDecoratorParams.js +0 -1
- package/decorator/get.d.ts +3 -0
- package/decorator/get.d.ts.map +1 -0
- package/decorator/get.js +0 -1
- package/decorator/index.d.ts +4 -0
- package/decorator/index.d.ts.map +1 -0
- package/decorator/index.js +0 -1
- package/decorator/post.d.ts +3 -0
- package/decorator/post.d.ts.map +1 -0
- package/decorator/post.js +0 -1
- package/filters/AccessControl.d.ts +13 -0
- package/filters/AccessControl.d.ts.map +1 -0
- package/filters/AccessControl.js +6 -10
- package/filters/AccessRule.d.ts +83 -0
- package/filters/AccessRule.d.ts.map +1 -0
- package/filters/AccessRule.js +9 -12
- package/filters/auth/AuthInterface.d.ts +26 -0
- package/filters/auth/AuthInterface.d.ts.map +1 -0
- package/filters/auth/AuthInterface.js +0 -1
- package/filters/auth/AuthMethod.d.ts +38 -0
- package/filters/auth/AuthMethod.d.ts.map +1 -0
- package/filters/auth/AuthMethod.js +12 -1
- package/filters/auth/HttpBasicAuth.d.ts +23 -0
- package/filters/auth/HttpBasicAuth.d.ts.map +1 -0
- package/filters/auth/HttpBasicAuth.js +0 -1
- package/filters/auth/HttpBearerAuth.d.ts +18 -0
- package/filters/auth/HttpBearerAuth.d.ts.map +1 -0
- package/filters/auth/HttpBearerAuth.js +0 -1
- package/filters/auth/HttpHeaderAuth.d.ts +15 -0
- package/filters/auth/HttpHeaderAuth.d.ts.map +1 -0
- package/filters/auth/HttpHeaderAuth.js +2 -6
- package/filters/auth/JwtHttpBearerAuth.d.ts +21 -0
- package/filters/auth/JwtHttpBearerAuth.d.ts.map +1 -0
- package/filters/auth/JwtHttpBearerAuth.js +0 -1
- package/filters/auth/KeyCloakHttpBearerAuth.d.ts +23 -0
- package/filters/auth/KeyCloakHttpBearerAuth.d.ts.map +1 -0
- package/filters/auth/KeyCloakHttpBearerAuth.js +0 -1
- package/filters/auth/index.d.ts +5 -0
- package/filters/auth/index.d.ts.map +1 -0
- package/filters/auth/index.js +0 -1
- package/filters/index.d.ts +3 -0
- package/filters/index.d.ts.map +1 -0
- package/filters/index.js +0 -1
- package/index.d.ts +22 -0
- package/index.d.ts.map +1 -0
- package/index.js +26 -32
- package/model/RouteDefinition.d.ts +7 -0
- package/model/RouteDefinition.d.ts.map +1 -0
- package/model/RouteDefinition.js +0 -1
- package/package.json +10 -10
- package/rbac/AuthAssignment.d.ts +19 -0
- package/rbac/AuthAssignment.d.ts.map +1 -0
- package/rbac/AuthAssignment.js +0 -1
- package/rbac/AuthItem.d.ts +27 -0
- package/rbac/AuthItem.d.ts.map +1 -0
- package/rbac/AuthItem.js +0 -1
- package/rbac/AuthItemChild.d.ts +19 -0
- package/rbac/AuthItemChild.d.ts.map +1 -0
- package/rbac/AuthItemChild.js +0 -1
- package/rbac/AuthManager.d.ts +112 -0
- package/rbac/AuthManager.d.ts.map +1 -0
- package/rbac/AuthManager.js +9 -13
- package/requiments/Glob.d.ts +3 -0
- package/requiments/Glob.d.ts.map +1 -0
- package/requiments/Glob.js +0 -1
- package/requiments/ReflectUtil.d.ts +1 -0
- package/requiments/ReflectUtil.d.ts.map +1 -0
- package/requiments/ReflectUtil.js +0 -1
- package/requiments/Utils.d.ts +9 -0
- package/requiments/Utils.d.ts.map +1 -0
- package/requiments/Utils.js +11 -3
- package/validators/BooleanValidator.d.ts +1 -0
- package/validators/BooleanValidator.d.ts.map +1 -0
- package/validators/BooleanValidator.js +0 -1
- package/validators/CompareValidator.d.ts +1 -0
- package/validators/CompareValidator.d.ts.map +1 -0
- package/validators/CompareValidator.js +0 -1
- package/validators/DateValidator.d.ts +1 -0
- package/validators/DateValidator.d.ts.map +1 -0
- package/validators/DateValidator.js +0 -1
- package/validators/EmailValidator.d.ts +1 -0
- package/validators/EmailValidator.d.ts.map +1 -0
- package/validators/EmailValidator.js +0 -1
- package/validators/Validator.d.ts +18 -0
- package/validators/Validator.d.ts.map +1 -0
- package/validators/Validator.js +0 -1
- package/web/IdentityInterface.d.ts +55 -0
- package/web/IdentityInterface.d.ts.map +1 -0
- package/web/IdentityInterface.js +0 -1
- package/web/WebUser.d.ts +72 -0
- package/web/WebUser.d.ts.map +1 -0
- package/web/WebUser.js +2 -3
- package/BaseChyz.js.map +0 -1
- package/Chyz.js +0 -15
- package/Chyz.js.map +0 -1
- package/base/ActionFilter.js.map +0 -1
- package/base/BaseError.js.map +0 -1
- package/base/BaseObject.js +0 -20
- package/base/BaseObject.js.map +0 -1
- package/base/Behavior.js.map +0 -1
- package/base/CWebController.js.map +0 -1
- package/base/Component.js.map +0 -1
- package/base/Configurable.js.map +0 -1
- package/base/DataErrorDbException.js.map +0 -1
- package/base/DbConnection.js.map +0 -1
- package/base/ForbiddenHttpException.js.map +0 -1
- package/base/InvalidArgumentException.js.map +0 -1
- package/base/InvalidConfigException.js.map +0 -1
- package/base/Model.js.map +0 -1
- package/base/ModelManager.js.map +0 -1
- package/base/NotFoundHttpException.js.map +0 -1
- package/base/RestClient.js.map +0 -1
- package/base/UnauthorizedHttpException.js.map +0 -1
- package/base/ValidationHttpException.js.map +0 -1
- package/base/db/Exception.js.map +0 -1
- package/base/index.js.map +0 -1
- package/decorator/Middleware.js.map +0 -1
- package/decorator/controller.js.map +0 -1
- package/decorator/enums/ControllerDecoratorParams.js.map +0 -1
- package/decorator/get.js.map +0 -1
- package/decorator/index.js.map +0 -1
- package/decorator/post.js.map +0 -1
- package/filters/AccessControl.js.map +0 -1
- package/filters/AccessRule.js.map +0 -1
- package/filters/auth/AuthInterface.js.map +0 -1
- package/filters/auth/AuthMethod.js.map +0 -1
- package/filters/auth/HttpBasicAuth.js.map +0 -1
- package/filters/auth/HttpBearerAuth.js.map +0 -1
- package/filters/auth/HttpHeaderAuth.js.map +0 -1
- package/filters/auth/JwtHttpBearerAuth.js.map +0 -1
- package/filters/auth/KeyCloakHttpBearerAuth.js.map +0 -1
- package/filters/auth/index.js.map +0 -1
- package/filters/index.js.map +0 -1
- package/index.js.map +0 -1
- package/model/RouteDefinition.js.map +0 -1
- package/rbac/AuthAssignment.js.map +0 -1
- package/rbac/AuthItem.js.map +0 -1
- package/rbac/AuthItemChild.js.map +0 -1
- package/rbac/AuthManager.js.map +0 -1
- package/requiments/Glob.js.map +0 -1
- package/requiments/ReflectUtil.js.map +0 -1
- package/requiments/Utils.js.map +0 -1
- package/validators/BooleanValidator.js.map +0 -1
- package/validators/CompareValidator.js.map +0 -1
- package/validators/DateValidator.js.map +0 -1
- package/validators/EmailValidator.js.map +0 -1
- package/validators/Validator.js.map +0 -1
- package/web/IdentityInterface.js.map +0 -1
- package/web/WebUser.js.map +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HttpHeaderAuth } from "./HttpHeaderAuth";
|
|
2
|
+
import { Response } from "express";
|
|
3
|
+
export declare class HttpBearerAuth extends HttpHeaderAuth {
|
|
4
|
+
/**
|
|
5
|
+
* {@inheritdoc}
|
|
6
|
+
*/
|
|
7
|
+
header: string;
|
|
8
|
+
pattern: RegExp;
|
|
9
|
+
/**
|
|
10
|
+
* @var string the HTTP authentication realm
|
|
11
|
+
*/
|
|
12
|
+
realm: string;
|
|
13
|
+
/**
|
|
14
|
+
* {@inheritdoc}
|
|
15
|
+
*/
|
|
16
|
+
challenge(response: Response): void;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=HttpBearerAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpBearerAuth.d.ts","sourceRoot":"","sources":["../../../src/filters/auth/HttpBearerAuth.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,qBAAa,cAAe,SAAQ,cAAc;IAE9C;;OAEG;IACI,MAAM,SAAmB;IAEzB,OAAO,SAAsB;IACpC;;OAEG;IACI,KAAK,SAAS;IAGrB;;OAEG;IACI,SAAS,CAAC,QAAQ,EAAE,QAAQ;CAGtC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AuthMethod } from "./AuthMethod";
|
|
2
|
+
import { WebUser } from "../../web/WebUser";
|
|
3
|
+
import { Request, Response } from "express";
|
|
4
|
+
export declare class HttpHeaderAuth extends AuthMethod {
|
|
5
|
+
/**
|
|
6
|
+
* @var string the HTTP header name
|
|
7
|
+
*/
|
|
8
|
+
header: string;
|
|
9
|
+
/**
|
|
10
|
+
* @var string a pattern to use to extract the HTTP authentication value
|
|
11
|
+
*/
|
|
12
|
+
pattern: string;
|
|
13
|
+
authenticate(user: WebUser, request: Request, response: Response): Promise<any>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=HttpHeaderAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpHeaderAuth.d.ts","sourceRoot":"","sources":["../../../src/filters/auth/HttpHeaderAuth.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE1C,qBAAa,cAAe,SAAQ,UAAU;IAC1C;;OAEG;IACI,MAAM,SAAe;IAG5B;;OAEG;IAEI,OAAO,EAAG,MAAM,CAAC;IAGlB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,QAAQ;CA0BvE"}
|
|
@@ -14,13 +14,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
14
14
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
18
|
exports.HttpHeaderAuth = void 0;
|
|
22
19
|
const AuthMethod_1 = require("./AuthMethod");
|
|
23
|
-
const Utils_1 =
|
|
20
|
+
const Utils_1 = require("../../requiments/Utils");
|
|
24
21
|
class HttpHeaderAuth extends AuthMethod_1.AuthMethod {
|
|
25
22
|
constructor() {
|
|
26
23
|
super(...arguments);
|
|
@@ -34,7 +31,7 @@ class HttpHeaderAuth extends AuthMethod_1.AuthMethod {
|
|
|
34
31
|
let key = Object.keys(request.headers).find(key => key.toLowerCase() === this.header.toLowerCase());
|
|
35
32
|
if (key) {
|
|
36
33
|
let authHeader = request.headers[key];
|
|
37
|
-
if (!Utils_1.
|
|
34
|
+
if (!Utils_1.Utils.isEmpty(authHeader)) {
|
|
38
35
|
if (this.pattern) {
|
|
39
36
|
//preg_match
|
|
40
37
|
let matches = authHeader.match(this.pattern);
|
|
@@ -58,4 +55,3 @@ class HttpHeaderAuth extends AuthMethod_1.AuthMethod {
|
|
|
58
55
|
}
|
|
59
56
|
}
|
|
60
57
|
exports.HttpHeaderAuth = HttpHeaderAuth;
|
|
61
|
-
//# sourceMappingURL=HttpHeaderAuth.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HttpBearerAuth } from "./HttpBearerAuth";
|
|
2
|
+
import { Response, Request } from "express";
|
|
3
|
+
import { WebUser } from "../../web/WebUser";
|
|
4
|
+
export declare class JwtHttpBearerAuth extends HttpBearerAuth {
|
|
5
|
+
/**
|
|
6
|
+
* @var string|array<string, mixed>|Jwt application component ID of the JWT handler, configuration array, or JWT handler object
|
|
7
|
+
* itself. By default it's assumes that component of ID "jwt" has been configured.
|
|
8
|
+
*/
|
|
9
|
+
jwt: string;
|
|
10
|
+
auth: any;
|
|
11
|
+
/**
|
|
12
|
+
* @throws InvalidConfigException
|
|
13
|
+
*/
|
|
14
|
+
init(): void;
|
|
15
|
+
authenticate(user: WebUser, request: Request, response: Response): Promise<any>;
|
|
16
|
+
/**
|
|
17
|
+
* @throws UnauthorizedHttpException
|
|
18
|
+
*/
|
|
19
|
+
fail(response: Response): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=JwtHttpBearerAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JwtHttpBearerAuth.d.ts","sourceRoot":"","sources":["../../../src/filters/auth/JwtHttpBearerAuth.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAI1C,qBAAa,iBAAkB,SAAQ,cAAc;IACjD;;;OAGG;IACI,GAAG,SAAQ;IACX,IAAI,EAAC,GAAG,CAAQ;IAGvB;;OAEG;IACI,IAAI,IAAI,IAAI;IAWN,YAAY,CAAC,IAAI,EAAC,OAAO,EAAE,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,QAAQ;IAiC1E;;OAEG;IACI,IAAI,CAAC,QAAQ,EAAC,QAAQ,GAAG,IAAI;CAKvC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HttpBearerAuth } from "./HttpBearerAuth";
|
|
2
|
+
import { Request, Response } from "express";
|
|
3
|
+
import { WebUser } from "../../web/WebUser";
|
|
4
|
+
export declare class KeyCloakHttpBearerAuth extends HttpBearerAuth {
|
|
5
|
+
/**
|
|
6
|
+
* @var string|array<string, mixed>|Jwt application component ID of the JWT handler, configuration array, or JWT handler object
|
|
7
|
+
* itself. By default it's assumes that component of ID "jwt" has been configured.
|
|
8
|
+
*/
|
|
9
|
+
jwt: string;
|
|
10
|
+
auth: any;
|
|
11
|
+
keycloak: any;
|
|
12
|
+
/**
|
|
13
|
+
* @throws InvalidConfigException
|
|
14
|
+
*/
|
|
15
|
+
init(): void;
|
|
16
|
+
KeyCloakCheck(token: string, request: Request, response: Response): Promise<any>;
|
|
17
|
+
authenticate(user: WebUser, request: Request, response: Response): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* @throws UnauthorizedHttpException
|
|
20
|
+
*/
|
|
21
|
+
fail(response: Response): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=KeyCloakHttpBearerAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyCloakHttpBearerAuth.d.ts","sourceRoot":"","sources":["../../../src/filters/auth/KeyCloakHttpBearerAuth.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAI1C,qBAAa,sBAAuB,SAAQ,cAAc;IACtD;;;OAGG;IACI,GAAG,SAAQ;IACX,IAAI,EAAE,GAAG,CAAQ;IACjB,QAAQ,EAAE,GAAG,CAAQ;IAG5B;;OAEG;IACI,IAAI,IAAI,IAAI;IAcN,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;IAOjE,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;IAyD7E;;OAEG;IACI,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAKxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/filters/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA"}
|
package/filters/auth/index.js
CHANGED
|
@@ -9,4 +9,3 @@ var HttpHeaderAuth_1 = require("./HttpHeaderAuth");
|
|
|
9
9
|
Object.defineProperty(exports, "HttpHeaderAuth", { enumerable: true, get: function () { return HttpHeaderAuth_1.HttpHeaderAuth; } });
|
|
10
10
|
var HttpBasicAuth_1 = require("./HttpBasicAuth");
|
|
11
11
|
Object.defineProperty(exports, "HttpBasicAuth", { enumerable: true, get: function () { return HttpBasicAuth_1.HttpBasicAuth; } });
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA"}
|
package/filters/index.js
CHANGED
|
@@ -5,4 +5,3 @@ var AccessControl_1 = require("./AccessControl");
|
|
|
5
5
|
Object.defineProperty(exports, "AccessControl", { enumerable: true, get: function () { return AccessControl_1.AccessControl; } });
|
|
6
6
|
var AccessRule_1 = require("./AccessRule");
|
|
7
7
|
Object.defineProperty(exports, "AccessRule", { enumerable: true, get: function () { return AccessRule_1.AccessRule; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare module "express-serve-static-core" {
|
|
2
|
+
interface Request {
|
|
3
|
+
identity: any;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
import { RestClient } from "./base/RestClient";
|
|
7
|
+
import BaseChyz from "./BaseChyz";
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
declare const Chyz: BaseChyz;
|
|
12
|
+
export { Request, Response, NextFunction } from "./base/CRequest";
|
|
13
|
+
export { RouteDefinition } from "./model/RouteDefinition";
|
|
14
|
+
export { WebUser } from "./web/WebUser";
|
|
15
|
+
export { BaseChyz, RestClient };
|
|
16
|
+
export { Logs, ActionFilter, BaseError, Behavior, Component, Configurable, CWebController, DbConnection, ForbiddenHttpException, InvalidConfigException, InvalidArgumentException, NotFoundHttpException, UnauthorizedHttpException, DataErrorDbException, ValidationHttpException, Model, ModelManager, } from "./base";
|
|
17
|
+
export * from "./filters";
|
|
18
|
+
export * from "./filters/auth";
|
|
19
|
+
export * from "./decorator";
|
|
20
|
+
export * from "./requiments/Utils";
|
|
21
|
+
export default Chyz;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,QAAQ,2BAA2B,CAAC;IACvC,UAAU,OAAO;QACb,QAAQ,EAAE,GAAG,CAAC;KACjB;CACJ;AAGD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;GAEG;AACH,QAAA,MAAM,IAAI,UAAiB,CAAC;AAC5B,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,CAAA;AAC7B,OAAO,EACH,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,EACL,YAAY,GACf,MAAM,QAAQ,CAAC;AAChB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,eAAe,IAAI,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,41 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2022.. Chy Bilgisayar Bilisim
|
|
5
|
+
* Author: Cihan Ozturk
|
|
6
|
+
* E-mail: cihan@chy.com.tr
|
|
7
|
+
* Github:https://github.com/cihan53/
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
2
10
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
11
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
5
17
|
}) : (function(o, m, k, k2) {
|
|
6
18
|
if (k2 === undefined) k2 = k;
|
|
7
19
|
o[k2] = m[k];
|
|
8
20
|
}));
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
21
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
23
|
};
|
|
21
24
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
26
|
};
|
|
24
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
26
|
-
|
|
27
|
-
Object.defineProperty(exports, "
|
|
28
|
+
exports.ModelManager = exports.Model = exports.ValidationHttpException = exports.DataErrorDbException = exports.UnauthorizedHttpException = exports.NotFoundHttpException = exports.InvalidArgumentException = exports.InvalidConfigException = exports.ForbiddenHttpException = exports.DbConnection = exports.CWebController = exports.Component = exports.Behavior = exports.BaseError = exports.ActionFilter = exports.Logs = exports.RestClient = exports.BaseChyz = exports.WebUser = void 0;
|
|
29
|
+
const RestClient_1 = require("./base/RestClient");
|
|
30
|
+
Object.defineProperty(exports, "RestClient", { enumerable: true, get: function () { return RestClient_1.RestClient; } });
|
|
28
31
|
const BaseChyz_1 = __importDefault(require("./BaseChyz"));
|
|
29
32
|
exports.BaseChyz = BaseChyz_1.default;
|
|
30
|
-
;
|
|
31
33
|
/**
|
|
32
34
|
*
|
|
33
35
|
*/
|
|
34
36
|
const Chyz = new BaseChyz_1.default();
|
|
35
|
-
|
|
37
|
+
var WebUser_1 = require("./web/WebUser");
|
|
38
|
+
Object.defineProperty(exports, "WebUser", { enumerable: true, get: function () { return WebUser_1.WebUser; } });
|
|
36
39
|
var base_1 = require("./base");
|
|
40
|
+
Object.defineProperty(exports, "Logs", { enumerable: true, get: function () { return base_1.Logs; } });
|
|
37
41
|
Object.defineProperty(exports, "ActionFilter", { enumerable: true, get: function () { return base_1.ActionFilter; } });
|
|
38
|
-
Object.defineProperty(exports, "BaseObject", { enumerable: true, get: function () { return base_1.BaseObject; } });
|
|
39
42
|
Object.defineProperty(exports, "BaseError", { enumerable: true, get: function () { return base_1.BaseError; } });
|
|
40
43
|
Object.defineProperty(exports, "Behavior", { enumerable: true, get: function () { return base_1.Behavior; } });
|
|
41
44
|
Object.defineProperty(exports, "Component", { enumerable: true, get: function () { return base_1.Component; } });
|
|
@@ -50,17 +53,8 @@ Object.defineProperty(exports, "DataErrorDbException", { enumerable: true, get:
|
|
|
50
53
|
Object.defineProperty(exports, "ValidationHttpException", { enumerable: true, get: function () { return base_1.ValidationHttpException; } });
|
|
51
54
|
Object.defineProperty(exports, "Model", { enumerable: true, get: function () { return base_1.Model; } });
|
|
52
55
|
Object.defineProperty(exports, "ModelManager", { enumerable: true, get: function () { return base_1.ModelManager; } });
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Object.defineProperty(exports, "HttpBearerAuth", { enumerable: true, get: function () { return auth_1.HttpBearerAuth; } });
|
|
59
|
-
Object.defineProperty(exports, "HttpHeaderAuth", { enumerable: true, get: function () { return auth_1.HttpHeaderAuth; } });
|
|
60
|
-
Object.defineProperty(exports, "HttpBasicAuth", { enumerable: true, get: function () { return auth_1.HttpBasicAuth; } });
|
|
61
|
-
var decorator_1 = require("./decorator");
|
|
62
|
-
Object.defineProperty(exports, "controller", { enumerable: true, get: function () { return decorator_1.controller; } });
|
|
63
|
-
Object.defineProperty(exports, "get", { enumerable: true, get: function () { return decorator_1.get; } });
|
|
64
|
-
Object.defineProperty(exports, "post", { enumerable: true, get: function () { return decorator_1.post; } });
|
|
65
|
-
exports.utils = __importStar(require("./requiments/Utils"));
|
|
66
|
-
//# sourceMappingURL=index.js.map
|
|
56
|
+
__exportStar(require("./filters"), exports);
|
|
57
|
+
__exportStar(require("./filters/auth"), exports);
|
|
58
|
+
__exportStar(require("./decorator"), exports);
|
|
59
|
+
__exportStar(require("./requiments/Utils"), exports);
|
|
60
|
+
exports.default = Chyz;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouteDefinition.d.ts","sourceRoot":"","sources":["../../src/model/RouteDefinition.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,eAAe;IAE5B,EAAE,EAAC,MAAM,CAAC;IAEV,IAAI,EAAE,MAAM,CAAC;IAEb,aAAa,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAC;IAE7D,UAAU,EAAE,MAAM,CAAC;CACtB"}
|
package/model/RouteDefinition.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chyz",
|
|
3
|
-
"version": "
|
|
4
|
-
"typings": "dist/index",
|
|
3
|
+
"version": "2.0.0-rc.11",
|
|
5
4
|
"description": "Nodejs Micro service Framework",
|
|
6
5
|
"scripts": {
|
|
7
|
-
"dev": "nodemon -t --trace-warnings index.ts",
|
|
8
|
-
"debug": "ts-node index.ts",
|
|
9
|
-
"build": "rmdir /S /Q .\\dist && npx tsc && xcopy .\\log .\\dist\\log /e /i /h /Y && copy .\\package.json .\\dist\\package.json && copy .\\README.md .\\dist\\README.md",
|
|
10
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
7
|
"postversion": "git push && git push --tags"
|
|
12
8
|
},
|
|
@@ -20,6 +16,9 @@
|
|
|
20
16
|
"url": "https://github.com/cihan53/Chy-Nodejs-Framework/issues"
|
|
21
17
|
},
|
|
22
18
|
"homepage": "https://github.com/cihan53/Chy-Nodejs-Framework#readme",
|
|
19
|
+
"resolutions": {
|
|
20
|
+
"ts-node": "^10.2.0"
|
|
21
|
+
},
|
|
23
22
|
"dependencies": {
|
|
24
23
|
"axios": "^0.23.0",
|
|
25
24
|
"babel-plugin-transform-decorators-legacy": "^1.3.5",
|
|
@@ -45,13 +44,14 @@
|
|
|
45
44
|
"validate.js": "^0.13.1"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
|
-
"@types/express": "^4.17.13",
|
|
49
|
-
"@types/node": "^16.6.1",
|
|
50
47
|
"@types/validator": "^13.6.3",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
48
|
+
"@types/express": "^4.17.13",
|
|
49
|
+
"@types/node": "^18.6.5",
|
|
50
|
+
"nodemon": "^2.0.19",
|
|
51
|
+
"ts-node": "^10.9.1",
|
|
52
|
+
"typescript": "^4.7.4"
|
|
54
53
|
},
|
|
54
|
+
|
|
55
55
|
"keywords": [
|
|
56
56
|
"Framework",
|
|
57
57
|
"RespAPI",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DataTypes, Model, Relation } from "../base";
|
|
2
|
+
export declare class AuthAssignmentClass extends Model {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
tableName(): string;
|
|
5
|
+
attributes(): {
|
|
6
|
+
item_name: {
|
|
7
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
8
|
+
primaryKey: boolean;
|
|
9
|
+
allowNull: boolean;
|
|
10
|
+
};
|
|
11
|
+
user_id: {
|
|
12
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
13
|
+
allowNull: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
init(): void;
|
|
17
|
+
relations(): Relation[];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=AuthAssignment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthAssignment.d.ts","sourceRoot":"","sources":["../../src/rbac/AuthAssignment.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAgB,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjE,qBAAa,mBAAoB,SAAQ,KAAK;IAC1C,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAEjB,SAAS;IAGT,UAAU;;;;;;;;;;;IAiBV,IAAI;IAKJ,SAAS,IAAI,QAAQ,EAAE;CAW1B"}
|
package/rbac/AuthAssignment.js
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DataTypes, Model, Relation } from "../base";
|
|
2
|
+
export declare class AuthItemClass extends Model {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
tableName(): string;
|
|
5
|
+
attributes(): {
|
|
6
|
+
name: {
|
|
7
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
8
|
+
primaryKey: boolean;
|
|
9
|
+
allowNull: boolean;
|
|
10
|
+
};
|
|
11
|
+
type: {
|
|
12
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
13
|
+
allowNull: boolean;
|
|
14
|
+
};
|
|
15
|
+
description: {
|
|
16
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
17
|
+
allowNull: boolean;
|
|
18
|
+
};
|
|
19
|
+
rule_name: {
|
|
20
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
21
|
+
allowNull: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
init(): void;
|
|
25
|
+
relations(): Relation[];
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=AuthItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthItem.d.ts","sourceRoot":"","sources":["../../src/rbac/AuthItem.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAgB,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjE,qBAAa,aAAc,SAAQ,KAAK;IACpC,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAEjB,SAAS;IAIT,UAAU;;;;;;;;;;;;;;;;;;;IAwBV,IAAI;IAKJ,SAAS,IAAI,QAAQ,EAAE;CAU1B"}
|
package/rbac/AuthItem.js
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DataTypes, Model, Relation } from "../base";
|
|
2
|
+
export declare class AuthItemChildClass extends Model {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
tableName(): string;
|
|
5
|
+
attributes(): {
|
|
6
|
+
parent: {
|
|
7
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
8
|
+
primaryKey: boolean;
|
|
9
|
+
allowNull: boolean;
|
|
10
|
+
};
|
|
11
|
+
child: {
|
|
12
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
13
|
+
allowNull: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
init(): void;
|
|
17
|
+
relations(): Relation[];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=AuthItemChild.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthItemChild.d.ts","sourceRoot":"","sources":["../../src/rbac/AuthItemChild.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAgB,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjE,qBAAa,kBAAmB,SAAQ,KAAK;IACzC,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAEjB,SAAS;IAIT,UAAU;;;;;;;;;;;IAeV,IAAI;IAKJ,SAAS,IAAI,QAAQ,EAAE;CAU1B"}
|
package/rbac/AuthItemChild.js
CHANGED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Component } from "../base";
|
|
2
|
+
interface Role {
|
|
3
|
+
type: number;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
ruleName: string;
|
|
7
|
+
data: string;
|
|
8
|
+
params: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class AuthManager extends Component {
|
|
11
|
+
static readonly TYPE_ROLE = 1;
|
|
12
|
+
static readonly TYPE_PERMISSION = 2;
|
|
13
|
+
init(): void;
|
|
14
|
+
/**
|
|
15
|
+
* @var Item[] all auth items (name => Item)
|
|
16
|
+
*/
|
|
17
|
+
protected items: any;
|
|
18
|
+
checkAccessAssignments: any;
|
|
19
|
+
defaultRoles: any;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
checkAccess(userId: number, permissionName: string, params?: any[]): Promise<boolean>;
|
|
24
|
+
checkAccessFromCache(): Promise<void>;
|
|
25
|
+
checkAccessRecursive(user: string | number, itemname: string, params: any[], assignments: any): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param name
|
|
29
|
+
*/
|
|
30
|
+
getItem(name: string): Promise<any>;
|
|
31
|
+
getItems(type: number): Promise<any>;
|
|
32
|
+
getRolesByUser(userId: number): Promise<any>;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param roleName
|
|
36
|
+
*/
|
|
37
|
+
getChildRoles(roleName: string): Promise<any>;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @param roleName
|
|
41
|
+
*/
|
|
42
|
+
getPermissionsByRole(roleName: string): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @param userId
|
|
46
|
+
*/
|
|
47
|
+
getPermissionsByUser(userId: number): Promise<any>;
|
|
48
|
+
/**
|
|
49
|
+
* Returns all permissions that are directly assigned to user.
|
|
50
|
+
* @return Permission[] all direct permissions that the user has. The array is indexed by the permission names.
|
|
51
|
+
*/
|
|
52
|
+
protected getDirectPermissionsByUser(userId: number): Promise<any>;
|
|
53
|
+
protected getInheritedPermissionsByUser(userId: number): Promise<any>;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @param userId
|
|
57
|
+
*/
|
|
58
|
+
getItemsByUser(userId: number): Promise<any>;
|
|
59
|
+
/**
|
|
60
|
+
* Returns all role assignment information for the specified role.
|
|
61
|
+
* @param $roleName
|
|
62
|
+
*/
|
|
63
|
+
getUserIdsByRole(roleName: number): Promise<any>;
|
|
64
|
+
/**
|
|
65
|
+
* {@inheritdoc}
|
|
66
|
+
*/
|
|
67
|
+
getRole(name: string): Promise<Role | null>;
|
|
68
|
+
/**
|
|
69
|
+
* {@inheritdoc}
|
|
70
|
+
*/
|
|
71
|
+
getRoles(): Promise<any>;
|
|
72
|
+
/**
|
|
73
|
+
* Recursively finds all children and grand children of the specified item.
|
|
74
|
+
* @param string $name the name of the item whose children are to be looked for.
|
|
75
|
+
* @param array $childrenList the child list built via [[getChildrenList()]]
|
|
76
|
+
* @param array $result the children and grand children (in array keys)
|
|
77
|
+
*/
|
|
78
|
+
protected getChildrenRecursive(name: string, childrenList: any, model: any): void;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @param roleName
|
|
82
|
+
* @param userId
|
|
83
|
+
*/
|
|
84
|
+
getAssignment(roleName: string, userId: string): any;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
88
|
+
getAssignments(userId: number): Promise<any>;
|
|
89
|
+
/**
|
|
90
|
+
* Returns the children for every parent.
|
|
91
|
+
* @return array the children list. Each array key is a parent item name,
|
|
92
|
+
* and the corresponding array value is a list of child item names.
|
|
93
|
+
*/
|
|
94
|
+
protected getChildrenList(): Promise<any>;
|
|
95
|
+
/**
|
|
96
|
+
* Check whether $userId is empty.
|
|
97
|
+
* @param mixed $userId
|
|
98
|
+
* @return bool
|
|
99
|
+
* @since 2.0.26
|
|
100
|
+
*/
|
|
101
|
+
protected isEmptyUserId(userId: string): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Checks whether array of $assignments is empty and [[defaultRoles]] property is empty as well.
|
|
104
|
+
*
|
|
105
|
+
* @param Assignment[] $assignments array of user's assignments
|
|
106
|
+
* @return bool whether array of $assignments is empty and [[defaultRoles]] property is empty as well
|
|
107
|
+
* @since 2.0.11
|
|
108
|
+
*/
|
|
109
|
+
protected hasNoAssignments(assignments: any): any;
|
|
110
|
+
}
|
|
111
|
+
export {};
|
|
112
|
+
//# sourceMappingURL=AuthManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthManager.d.ts","sourceRoot":"","sources":["../../src/rbac/AuthManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAuC,MAAM,SAAS,CAAC;AAKxE,UAAU,IAAI;IACV,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AAYD,qBAAa,WAAY,SAAQ,SAAS;IACtC,MAAM,CAAC,QAAQ,CAAC,SAAS,KAAK;IAC9B,MAAM,CAAC,QAAQ,CAAC,eAAe,KAAK;IAEpC,IAAI;IAIJ;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC;IACrB,sBAAsB,EAAE,GAAG,CAAK;IAChC,YAAY,EAAE,GAAG,CAAK;IAGtB;;OAEG;IAEU,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAmBhG,oBAAoB;IAKb,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IA4B7H;;;OAGG;IACU,OAAO,CAAC,IAAI,EAAE,MAAM;IAOpB,QAAQ,CAAC,IAAI,EAAE,MAAM;IAYrB,cAAc,CAAC,MAAM,EAAE,MAAM;IAyB1C;;;OAGG;IACU,aAAa,CAAC,QAAQ,EAAE,MAAM;IAoB3C;;;OAGG;IACU,oBAAoB,CAAC,QAAQ,EAAE,MAAM;IAuBlD;;;OAGG;IACU,oBAAoB,CAAC,MAAM,EAAE,MAAM;IAYhD;;;OAGG;cACa,0BAA0B,CAAC,MAAM,EAAE,MAAM;cAuBzC,6BAA6B,CAAC,MAAM,EAAE,MAAM;IA4B5D;;;OAGG;IACU,cAAc,CAAC,MAAM,EAAE,MAAM;IAc1C;;;OAGG;IACU,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAO9C;;OAEG;IACU,OAAO,CAAC,IAAI,EAAE,MAAM;IAMjC;;OAEG;IACI,QAAQ;IAIf;;;;;OAKG;IACH,SAAS,CAAC,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAW1E;;;;OAIG;IACI,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAQrD;;OAEG;IACU,cAAc,CAAC,MAAM,EAAE,MAAM;IAkB1C;;;;OAIG;cACa,eAAe;IAU/B;;;;;OAKG;IACH,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM;IAItC;;;;;;OAMG;IACH,SAAS,CAAC,gBAAgB,CAAC,WAAW,EAAE,GAAG;CAG9C"}
|