chyz 1.2.5-rc.2 → 2.0.0-rc.12
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 +63 -0
- package/BaseChyz.d.ts.map +1 -0
- package/BaseChyz.js +128 -80
- 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 +5 -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 +24 -31
- 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
package/base/Model.js
CHANGED
|
@@ -20,7 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.Model = exports.NOW = exports.DataTypes = void 0;
|
|
22
22
|
const BaseChyz_1 = __importDefault(require("../BaseChyz"));
|
|
23
|
-
const Utils_1 =
|
|
23
|
+
const Utils_1 = require("../requiments/Utils");
|
|
24
24
|
const Component_1 = require("./Component");
|
|
25
25
|
const InvalidConfigException_1 = require("./InvalidConfigException");
|
|
26
26
|
const sequelize_1 = require("sequelize");
|
|
@@ -93,7 +93,7 @@ class Model extends Component_1.Component {
|
|
|
93
93
|
this._sequelize = sequelize;
|
|
94
94
|
else
|
|
95
95
|
this._sequelize = this.getDb();
|
|
96
|
-
if (!Utils_1.
|
|
96
|
+
if (!Utils_1.Utils.isEmpty(this.attributes())) {
|
|
97
97
|
this._model = this._sequelize.define(this._tableName, this.attributes(), {
|
|
98
98
|
tableName: this.tableName(),
|
|
99
99
|
timestamps: false,
|
|
@@ -457,7 +457,7 @@ class Model extends Component_1.Component {
|
|
|
457
457
|
*/
|
|
458
458
|
load(data, formName = null) {
|
|
459
459
|
let scope = formName === null ? this.formName() : formName;
|
|
460
|
-
if (scope === '' && !Utils_1.
|
|
460
|
+
if (scope === '' && !Utils_1.Utils.isEmpty(data)) {
|
|
461
461
|
this.setAttribute(data);
|
|
462
462
|
return true;
|
|
463
463
|
}
|
|
@@ -469,7 +469,7 @@ class Model extends Component_1.Component {
|
|
|
469
469
|
}
|
|
470
470
|
bulkLoad(data, formName = null) {
|
|
471
471
|
let scope = formName === null ? this.formName() : formName;
|
|
472
|
-
if (scope === '' && !Utils_1.
|
|
472
|
+
if (scope === '' && !Utils_1.Utils.isEmpty(data)) {
|
|
473
473
|
this.setAttribute(data);
|
|
474
474
|
return true;
|
|
475
475
|
}
|
|
@@ -505,4 +505,3 @@ class Model extends Component_1.Component {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
exports.Model = Model;
|
|
508
|
-
//# sourceMappingURL=Model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelManager.d.ts","sourceRoot":"","sources":["../../src/base/ModelManager.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,YAAY,EAAE,GAI1B,CAAA"}
|
package/base/ModelManager.js
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModelManager = void 0;
|
|
4
|
+
/*
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2021.. Chy Bilgisayar Bilisim
|
|
7
|
+
* Author: Cihan Ozturk
|
|
8
|
+
* E-mail: cihan@chy.com.tr
|
|
9
|
+
* Github:https://github.com/cihan53/
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
// interface ObjectConstructor {
|
|
13
|
+
// _register(o: Model): void;
|
|
14
|
+
// }
|
|
4
15
|
exports.ModelManager = {
|
|
5
16
|
_register(map) {
|
|
6
17
|
Object.assign(this, map);
|
|
7
18
|
}
|
|
8
19
|
};
|
|
9
|
-
//# sourceMappingURL=ModelManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotFoundHttpException.d.ts","sourceRoot":"","sources":["../../src/base/NotFoundHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,qBAAsB,SAAQ,SAAS;IAC3B,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;CAGvC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Component } from "./Component";
|
|
2
|
+
export declare class RestClient extends Component {
|
|
3
|
+
post(url: string, args: any[], headers?: any): any;
|
|
4
|
+
get(url: string, args: any[], headers?: any): any;
|
|
5
|
+
Rest(params: any): any;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=RestClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RestClient.d.ts","sourceRoot":"","sources":["../../src/base/RestClient.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAItC,qBAAa,UAAW,SAAQ,SAAS;IAC9B,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAC,OAAO,GAAC,GAAM;IAI5C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAC,OAAO,GAAC,GAAM;IAI3C,IAAI,CAAC,MAAM,EAAE,GAAG;CAG1B"}
|
package/base/RestClient.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnauthorizedHttpException.d.ts","sourceRoot":"","sources":["../../src/base/UnauthorizedHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,yBAA0B,SAAQ,SAAS;IAC/B,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;CAIvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationHttpException.d.ts","sourceRoot":"","sources":["../../src/base/ValidationHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,uBAAwB,SAAQ,SAAS;IAC7B,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;CAGvC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseError } from "../BaseError";
|
|
2
|
+
export declare class Exception extends BaseError {
|
|
3
|
+
errorInfo: never[];
|
|
4
|
+
protected code: string;
|
|
5
|
+
constructor(message: string, errorInfo?: any, code?: string, previous?: null);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=Exception.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Exception.d.ts","sourceRoot":"","sources":["../../../src/base/db/Exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAEvC,qBAAa,SAAU,SAAQ,SAAS;IAC7B,SAAS,UAAM;IACtB,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEX,OAAO,EAAE,MAAM,EAAE,SAAS,GAAC,GAAQ,EAAE,IAAI,SAAK,EAAE,QAAQ,OAAO;CAO9E"}
|
package/base/db/Exception.js
CHANGED
package/base/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { Logs } from "./Logs";
|
|
2
|
+
export { BaseError } from "./BaseError";
|
|
3
|
+
export { ActionFilter } from "./ActionFilter";
|
|
4
|
+
export { Behavior } from "./Behavior";
|
|
5
|
+
export { Component } from "./Component";
|
|
6
|
+
export { Configurable } from "./Configurable";
|
|
7
|
+
export { CWebController } from "./CWebController";
|
|
8
|
+
export { DbConnection } from "./DbConnection";
|
|
9
|
+
export { ForbiddenHttpException } from "./ForbiddenHttpException";
|
|
10
|
+
export { InvalidConfigException } from "./InvalidConfigException";
|
|
11
|
+
export { InvalidArgumentException } from "./InvalidArgumentException";
|
|
12
|
+
export { NotFoundHttpException } from "./NotFoundHttpException";
|
|
13
|
+
export { UnauthorizedHttpException } from "./UnauthorizedHttpException";
|
|
14
|
+
export { DataErrorDbException } from "./DataErrorDbException";
|
|
15
|
+
export { ValidationHttpException } from "./ValidationHttpException";
|
|
16
|
+
export { Model, Relation, DataTypes, NOW } from "./Model";
|
|
17
|
+
export { RestClient } from "./RestClient";
|
|
18
|
+
export { ModelManager } from "./ModelManager";
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAA;AAC3B,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;AACnC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAC,yBAAyB,EAAC,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAE,GAAG,EAAC,MAAM,SAAS,CAAA;AACrD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA"}
|
package/base/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModelManager = exports.RestClient = exports.NOW = exports.DataTypes = 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.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
var BaseObject_1 = require("./BaseObject");
|
|
7
|
-
Object.defineProperty(exports, "BaseObject", { enumerable: true, get: function () { return BaseObject_1.BaseObject; } });
|
|
3
|
+
exports.ModelManager = exports.RestClient = exports.NOW = exports.DataTypes = 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.ActionFilter = exports.BaseError = exports.Logs = void 0;
|
|
4
|
+
var Logs_1 = require("./Logs");
|
|
5
|
+
Object.defineProperty(exports, "Logs", { enumerable: true, get: function () { return Logs_1.Logs; } });
|
|
8
6
|
var BaseError_1 = require("./BaseError");
|
|
9
7
|
Object.defineProperty(exports, "BaseError", { enumerable: true, get: function () { return BaseError_1.BaseError; } });
|
|
8
|
+
var ActionFilter_1 = require("./ActionFilter");
|
|
9
|
+
Object.defineProperty(exports, "ActionFilter", { enumerable: true, get: function () { return ActionFilter_1.ActionFilter; } });
|
|
10
10
|
var Behavior_1 = require("./Behavior");
|
|
11
11
|
Object.defineProperty(exports, "Behavior", { enumerable: true, get: function () { return Behavior_1.Behavior; } });
|
|
12
12
|
var Component_1 = require("./Component");
|
|
@@ -37,4 +37,3 @@ var RestClient_1 = require("./RestClient");
|
|
|
37
37
|
Object.defineProperty(exports, "RestClient", { enumerable: true, get: function () { return RestClient_1.RestClient; } });
|
|
38
38
|
var ModelManager_1 = require("./ModelManager");
|
|
39
39
|
Object.defineProperty(exports, "ModelManager", { enumerable: true, get: function () { return ModelManager_1.ModelManager; } });
|
|
40
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Middleware.d.ts","sourceRoot":"","sources":["../../src/decorator/Middleware.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,wBAAgB,UAAU,CAAC,WAAW,EAAE,cAAc,EAAE,GAAG,QAAQ,CAIlE"}
|
package/decorator/Middleware.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/decorator/controller.ts"],"names":[],"mappings":"AAQA,OAAQ,kBAAkB,CAAC;AAC3B,eAAO,MAAM,UAAU,YAAY,MAAM,KAAQ,cAYhD,CAAC"}
|
package/decorator/controller.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControllerDecoratorParams.d.ts","sourceRoot":"","sources":["../../../src/decorator/enums/ControllerDecoratorParams.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IACjC,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,UAAU,eAAe;CAC5B"}
|
|
@@ -7,4 +7,3 @@ var ControllerDecoratorParams;
|
|
|
7
7
|
ControllerDecoratorParams["Method"] = "method";
|
|
8
8
|
ControllerDecoratorParams["Middleware"] = "middleware";
|
|
9
9
|
})(ControllerDecoratorParams = exports.ControllerDecoratorParams || (exports.ControllerDecoratorParams = {}));
|
|
10
|
-
//# sourceMappingURL=ControllerDecoratorParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/decorator/get.ts"],"names":[],"mappings":"AAOA,OAAO,kBAAkB,CAAC;AAG1B,eAAO,MAAM,GAAG,SAAU,MAAM,KAAG,eA0BlC,CAAC"}
|
package/decorator/get.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAA"}
|
package/decorator/index.js
CHANGED
|
@@ -7,4 +7,3 @@ var get_1 = require("./get");
|
|
|
7
7
|
Object.defineProperty(exports, "get", { enumerable: true, get: function () { return get_1.get; } });
|
|
8
8
|
var post_1 = require("./post");
|
|
9
9
|
Object.defineProperty(exports, "post", { enumerable: true, get: function () { return post_1.post; } });
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../src/decorator/post.ts"],"names":[],"mappings":"AAOA,OAAQ,kBAAkB,CAAC;AAG3B,eAAO,MAAM,IAAI,SAAU,MAAM,KAAG,eAyBnC,CAAC"}
|
package/decorator/post.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="express" />
|
|
2
|
+
import { Request, Response } from "../index";
|
|
3
|
+
import { ActionFilter } from "../base/ActionFilter";
|
|
4
|
+
import { WebUser } from "../web/WebUser";
|
|
5
|
+
export declare class AccessControl extends ActionFilter {
|
|
6
|
+
user: any;
|
|
7
|
+
rules: any;
|
|
8
|
+
denyCallback: any;
|
|
9
|
+
init(): void;
|
|
10
|
+
beforeAction(action: any, request: Request, res: Response): Promise<boolean>;
|
|
11
|
+
denyAccess(user: WebUser): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=AccessControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessControl.d.ts","sourceRoot":"","sources":["../../src/filters/AccessControl.ts"],"names":[],"mappings":";AAMA,OAAO,EAAC,OAAO,EAAC,QAAQ,EAAU,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAIvC,qBAAa,aAAc,SAAQ,YAAY;IAEpC,IAAI,EAAE,GAAG,CAAQ;IACjB,KAAK,EAAE,GAAG,CAAC;IACX,YAAY,EAAE,GAAG,CAAQ;IAEzB,IAAI;IAeE,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAC,GAAG,EAAC,QAAQ;IAgC7D,UAAU,CAAC,IAAI,EAAE,OAAO;CAMlC"}
|
package/filters/AccessControl.js
CHANGED
|
@@ -8,9 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.AccessControl = void 0;
|
|
16
13
|
/*
|
|
@@ -19,12 +16,12 @@ exports.AccessControl = void 0;
|
|
|
19
16
|
* E-mail: cihan@chy.com.tr
|
|
20
17
|
* Github:https://github.com/cihan53/
|
|
21
18
|
*/
|
|
22
|
-
const
|
|
19
|
+
const index_1 = require("../index");
|
|
23
20
|
const ForbiddenHttpException_1 = require("../base/ForbiddenHttpException");
|
|
24
21
|
const ActionFilter_1 = require("../base/ActionFilter");
|
|
25
22
|
const AccessRule_1 = require("./AccessRule");
|
|
26
23
|
const WebUser_1 = require("../web/WebUser");
|
|
27
|
-
const Utils_1 =
|
|
24
|
+
const Utils_1 = require("../requiments/Utils");
|
|
28
25
|
class AccessControl extends ActionFilter_1.ActionFilter {
|
|
29
26
|
constructor() {
|
|
30
27
|
super(...arguments);
|
|
@@ -35,15 +32,15 @@ class AccessControl extends ActionFilter_1.ActionFilter {
|
|
|
35
32
|
var _a;
|
|
36
33
|
super.init();
|
|
37
34
|
if (this.user == undefined) {
|
|
38
|
-
this.user = (_a = Utils_1.
|
|
35
|
+
this.user = (_a = Utils_1.Utils.cloneDeep(index_1.BaseChyz.getComponent("user"))) !== null && _a !== void 0 ? _a : new WebUser_1.WebUser();
|
|
39
36
|
}
|
|
40
37
|
this.rules.forEach((rule, index) => {
|
|
41
38
|
if (rule === Object(rule)) {
|
|
42
|
-
this.rules[index] = Utils_1.
|
|
39
|
+
this.rules[index] = Utils_1.Utils.createObject(new AccessRule_1.AccessRule(), rule);
|
|
43
40
|
}
|
|
44
41
|
});
|
|
45
42
|
}
|
|
46
|
-
beforeAction(action, request) {
|
|
43
|
+
beforeAction(action, request, res) {
|
|
47
44
|
var _a, _b;
|
|
48
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
46
|
let allow;
|
|
@@ -80,8 +77,7 @@ class AccessControl extends ActionFilter_1.ActionFilter {
|
|
|
80
77
|
user.loginRequired();
|
|
81
78
|
}
|
|
82
79
|
else
|
|
83
|
-
throw new ForbiddenHttpException_1.ForbiddenHttpException(
|
|
80
|
+
throw new ForbiddenHttpException_1.ForbiddenHttpException(index_1.BaseChyz.t('You are not allowed to perform this action.'));
|
|
84
81
|
}
|
|
85
82
|
}
|
|
86
83
|
exports.AccessControl = AccessControl;
|
|
87
|
-
//# sourceMappingURL=AccessControl.js.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { WebUser } from "../web/WebUser";
|
|
2
|
+
import { Component } from "../base/Component";
|
|
3
|
+
import { Request } from "express";
|
|
4
|
+
export declare class AccessRule extends Component {
|
|
5
|
+
/**
|
|
6
|
+
* @var bool whether this is an 'allow' rule or 'deny' rule.
|
|
7
|
+
*/
|
|
8
|
+
allow: any;
|
|
9
|
+
/**
|
|
10
|
+
* @var array list of action IDs that this rule applies to. The comparison is case-sensitive.
|
|
11
|
+
* If not set or empty, it means this rule applies to all actions.
|
|
12
|
+
*/
|
|
13
|
+
actions: any;
|
|
14
|
+
/**
|
|
15
|
+
* @var array list of the controller IDs that this rule applies to.
|
|
16
|
+
*/
|
|
17
|
+
controllers: any;
|
|
18
|
+
/**
|
|
19
|
+
* - `?`: matches a guest user (not authenticated yet)
|
|
20
|
+
* - `@`: matches an authenticated user
|
|
21
|
+
*/
|
|
22
|
+
roles: any;
|
|
23
|
+
/**
|
|
24
|
+
* @var array list of RBAC (Role-Based Access Control) permissions that this rules applies to.
|
|
25
|
+
*/
|
|
26
|
+
permissions: any;
|
|
27
|
+
/**
|
|
28
|
+
* @var array|Closure parameters to pass to the [[User::can()]] function for evaluating
|
|
29
|
+
* user permissions in [[$roles]].
|
|
30
|
+
*
|
|
31
|
+
* If this is an array, it will be passed directly to [[User::can()]]. For example for passing an
|
|
32
|
+
* ID from the current request, you may use the following:
|
|
33
|
+
*
|
|
34
|
+
* ```php
|
|
35
|
+
* ['postId' => Yii::$app->request->get('id')]
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* You may also specify a closure that returns an array. This can be used to
|
|
39
|
+
* evaluate the array values only if they are needed, for example when a model needs to be
|
|
40
|
+
* loaded like in the following code:
|
|
41
|
+
*
|
|
42
|
+
* ```php
|
|
43
|
+
* 'rules' => [
|
|
44
|
+
* [
|
|
45
|
+
* 'allow' => true,
|
|
46
|
+
* 'actions' => ['update'],
|
|
47
|
+
* 'roles' => ['updatePost'],
|
|
48
|
+
* 'roleParams' => function($rule) {
|
|
49
|
+
* return ['post' => Post::findOne(Yii::$app->request->get('id'))];
|
|
50
|
+
* },
|
|
51
|
+
* ],
|
|
52
|
+
* ],
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* A reference to the [[AccessRule]] instance will be passed to the closure as the first parameter.
|
|
56
|
+
*
|
|
57
|
+
* @see roles
|
|
58
|
+
* @since 2.0.12
|
|
59
|
+
*/
|
|
60
|
+
roleParams: any;
|
|
61
|
+
/**
|
|
62
|
+
* @var array list of user IP addresses that this rule applies to. An IP address
|
|
63
|
+
* can contain the wildcard `*` at the end so that it matches IP addresses with the same prefix.
|
|
64
|
+
* For example, '192.168.*' matches all IP addresses in the segment '192.168.'.
|
|
65
|
+
* It may also contain a pattern/mask like '172.16.0.0/12' which would match all IPs from the
|
|
66
|
+
* 20-bit private network block in RFC1918.
|
|
67
|
+
* If not set or empty, it means this rule applies to all IP addresses.
|
|
68
|
+
*/
|
|
69
|
+
ips: any;
|
|
70
|
+
allows(action: any, user: WebUser, request: Request): Promise<any>;
|
|
71
|
+
/**
|
|
72
|
+
* @param Action $action the action
|
|
73
|
+
* @return bool whether the rule applies to the action
|
|
74
|
+
*/
|
|
75
|
+
protected matchAction(action: any): any;
|
|
76
|
+
/**
|
|
77
|
+
* @param Controller $controller the controller
|
|
78
|
+
* @return bool whether the rule applies to the controller
|
|
79
|
+
*/
|
|
80
|
+
protected matchController(controller: any): boolean;
|
|
81
|
+
protected matchRole(user: WebUser): Promise<boolean>;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=AccessRule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessRule.d.ts","sourceRoot":"","sources":["../../src/filters/AccessRule.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAKhC,qBAAa,UAAW,SAAQ,SAAS;IAErC;;OAEG;IACI,KAAK,EAAE,GAAG,CAAC;IAClB;;;OAGG;IACI,OAAO,EAAE,GAAG,CAAC;IAEpB;;OAEG;IACI,WAAW,EAAE,GAAG,CAAC;IAExB;;;OAGG;IAEI,KAAK,EAAE,GAAG,CAAC;IAElB;;OAEG;IACI,WAAW,EAAE,GAAG,CAAC;IAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACI,UAAU,EAAE,GAAG,CAAM;IAG5B;;;;;;;OAOG;IACI,GAAG,EAAE,GAAG,CAAC;IAGH,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;IAoBhE;;;OAGG;IACH,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG;IAIjC;;;OAGG;IACH,SAAS,CAAC,eAAe,CAAC,UAAU,EAAE,GAAG;cAezB,SAAS,CAAC,IAAI,EAAE,OAAO;CA6C1C"}
|
package/filters/AccessRule.js
CHANGED
|
@@ -8,15 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.AccessRule = void 0;
|
|
16
|
-
var _ = require('lodash');
|
|
17
13
|
const Component_1 = require("../base/Component");
|
|
18
14
|
const InvalidConfigException_1 = require("../base/InvalidConfigException");
|
|
19
|
-
const Utils_1 =
|
|
15
|
+
const Utils_1 = require("../requiments/Utils");
|
|
16
|
+
var _ = require('lodash');
|
|
20
17
|
class AccessRule extends Component_1.Component {
|
|
21
18
|
constructor() {
|
|
22
19
|
super(...arguments);
|
|
@@ -99,16 +96,17 @@ class AccessRule extends Component_1.Component {
|
|
|
99
96
|
}
|
|
100
97
|
matchRole(user) {
|
|
101
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
let items = Utils_1.
|
|
103
|
-
if (!Utils_1.
|
|
104
|
-
items = Utils_1.
|
|
99
|
+
let items = Utils_1.Utils.isEmpty(this.roles) ? [] : this.roles;
|
|
100
|
+
if (!Utils_1.Utils.isEmpty(this.permissions)) {
|
|
101
|
+
items = Utils_1.Utils.merge(items, this.permissions);
|
|
105
102
|
}
|
|
106
|
-
if (Utils_1.
|
|
103
|
+
if (Utils_1.Utils.isEmpty(items)) {
|
|
107
104
|
return true;
|
|
108
105
|
}
|
|
109
106
|
if (!user) {
|
|
110
107
|
throw new InvalidConfigException_1.InvalidConfigException('The user application component must be available to specify roles in AccessRule.');
|
|
111
108
|
}
|
|
109
|
+
// @ts-ignore
|
|
112
110
|
let roleParams = [];
|
|
113
111
|
for (const itemsKey in items) {
|
|
114
112
|
let item = items[itemsKey];
|
|
@@ -124,8 +122,8 @@ class AccessRule extends Component_1.Component {
|
|
|
124
122
|
}
|
|
125
123
|
else {
|
|
126
124
|
//roleparams
|
|
127
|
-
if (!Utils_1.
|
|
128
|
-
roleParams = !Utils_1.
|
|
125
|
+
if (!Utils_1.Utils.isEmpty(this.roleParams)) {
|
|
126
|
+
roleParams = !Utils_1.Utils.isArray(this.roleParams) ? this.roleParams.apply(this) : this.roleParams;
|
|
129
127
|
}
|
|
130
128
|
if (yield user.can(item, this.roleParams)) {
|
|
131
129
|
return true;
|
|
@@ -137,4 +135,3 @@ class AccessRule extends Component_1.Component {
|
|
|
137
135
|
}
|
|
138
136
|
}
|
|
139
137
|
exports.AccessRule = AccessRule;
|
|
140
|
-
//# sourceMappingURL=AccessRule.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Request, Response } from "express";
|
|
2
|
+
export interface AuthInterface {
|
|
3
|
+
/**
|
|
4
|
+
* Authenticates the current user.
|
|
5
|
+
* @param User $user
|
|
6
|
+
* @param Request $request
|
|
7
|
+
* @param Response $response
|
|
8
|
+
* @return IdentityInterface the authenticated user identity. If authentication information is not provided, null will be returned.
|
|
9
|
+
* @throws UnauthorizedHttpException if authentication information is provided but is invalid.
|
|
10
|
+
*/
|
|
11
|
+
authenticate(user: any, request: Request, response: Response): any;
|
|
12
|
+
/**
|
|
13
|
+
* Generates challenges upon authentication failure.
|
|
14
|
+
* For example, some appropriate HTTP headers may be generated.
|
|
15
|
+
* @param Response $response
|
|
16
|
+
*/
|
|
17
|
+
challenge(response: Response): Response;
|
|
18
|
+
/**
|
|
19
|
+
* Handles authentication failure.
|
|
20
|
+
* The implementation should normally throw UnauthorizedHttpException to indicate authentication failure.
|
|
21
|
+
* @param Response $response
|
|
22
|
+
* @throws UnauthorizedHttpException
|
|
23
|
+
*/
|
|
24
|
+
handleFailure(response: Response): Response;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=AuthInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthInterface.d.ts","sourceRoot":"","sources":["../../../src/filters/auth/AuthInterface.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC1B;;;;;;;OAOG;IACF,YAAY,CAAC,IAAI,EAAC,GAAG,EAAE,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,QAAQ,GAAE,GAAG,CAAC;IAEhE;;;;OAIG;IACF,SAAS,CAAC,QAAQ,EAAC,QAAQ,GAAE,QAAQ,CAAC;IAEvC;;;;;OAKG;IACF,aAAa,CAAC,QAAQ,EAAC,QAAQ,GAAE,QAAQ,CAAC;CAC9C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ActionFilter } from "../../base/ActionFilter";
|
|
2
|
+
import { AuthInterface } from "./AuthInterface";
|
|
3
|
+
import { WebUser } from "../../web/WebUser";
|
|
4
|
+
import { Request, Response } from "express";
|
|
5
|
+
export declare abstract class AuthMethod extends ActionFilter implements AuthInterface {
|
|
6
|
+
/**
|
|
7
|
+
* @var User the user object representing the user authentication status. If not set, the `user` application component will be used.
|
|
8
|
+
*/
|
|
9
|
+
user: WebUser | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* @var Request the current request. If not set, the `request` application component will be used.
|
|
12
|
+
*/
|
|
13
|
+
request: Request | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* @var Response the response to be sent. If not set, the `response` application component will be used.
|
|
16
|
+
*/
|
|
17
|
+
response: Response | undefined;
|
|
18
|
+
optional: never[];
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param action
|
|
22
|
+
* @param request
|
|
23
|
+
* @param response
|
|
24
|
+
*/
|
|
25
|
+
beforeAction(action: any, request: Request, response: Response): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param user
|
|
29
|
+
* @param request
|
|
30
|
+
* @param response
|
|
31
|
+
*/
|
|
32
|
+
authenticate(user: WebUser, request: Request, response: Response): void;
|
|
33
|
+
challenge(response: Response): void;
|
|
34
|
+
handleFailure(response: Response): void;
|
|
35
|
+
getHeaderByKey(headers: any, findKey: any): any;
|
|
36
|
+
patternCheck(headerText: any, pattern: RegExp): any;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=AuthMethod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthMethod.d.ts","sourceRoot":"","sources":["../../../src/filters/auth/AuthMethod.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE1C,8BAAsB,UAAW,SAAQ,YAAa,YAAW,aAAa;IAE1E;;OAEG;IACI,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAEjC;;OAEG;IACI,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAEpC;;OAEG;IACI,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IAG/B,QAAQ,UAAM;IAErB;;;;;OAKG;IACU,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;IAoB3E;;;;;OAKG;IACH,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;IAKhE,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAKnC,aAAa,CAAC,QAAQ,EAAE,QAAQ;IAIhC,cAAc,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG;IASzC,YAAY,CAAC,UAAU,EAAC,GAAG,EAAE,OAAO,EAAC,MAAM;CAY9C"}
|