@pristine-ts/security 0.0.167 → 0.0.171
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/lib/cjs/errors/authenticator-decorator.error.js.map +1 -1
- package/dist/lib/cjs/errors/authenticator-instantiation.error.js.map +1 -1
- package/dist/lib/cjs/errors/guard-decorator.error.js.map +1 -1
- package/dist/lib/cjs/errors/guard-instantiation.error.js.map +1 -1
- package/dist/lib/cjs/guards/role.guard.js +3 -0
- package/dist/lib/cjs/guards/role.guard.js.map +1 -1
- package/dist/lib/esm/errors/authenticator-decorator.error.js.map +1 -1
- package/dist/lib/esm/errors/authenticator-instantiation.error.js.map +1 -1
- package/dist/lib/esm/errors/guard-decorator.error.js.map +1 -1
- package/dist/lib/esm/errors/guard-instantiation.error.js.map +1 -1
- package/dist/lib/esm/guards/role.guard.js +3 -0
- package/dist/lib/esm/guards/role.guard.js.map +1 -1
- package/dist/types/errors/authenticator-decorator.error.d.ts +2 -1
- package/dist/types/errors/authenticator-instantiation.error.d.ts +2 -1
- package/dist/types/errors/guard-decorator.error.d.ts +2 -1
- package/dist/types/errors/guard-instantiation.error.d.ts +2 -1
- package/dist/types/guards/role.guard.d.ts +1 -1
- package/dist/types/interfaces/guard.interface.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticator-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-decorator.error.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,gDAAkD;
|
|
1
|
+
{"version":3,"file":"authenticator-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-decorator.error.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,gDAAkD;AAGlD,MAAa,2BAA4B,SAAQ,sBAAa;IAE1D,YAAmB,OAAe,EAAE,aAAgD,EAAE,OAAY,EAAE,MAAW,EAC5F,WAAoB,EACpB,UAA+B;QAC9C,KAAK,CAAC,OAAO,EAAE;YACX,OAAO;YACP,aAAa;YACb,OAAO;YACP,MAAM;YACN,WAAW;YACX,UAAU;SACb,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,2BAA2B,CAAC,SAAS,CAAC,CAAC;IACvE,CAAC;CACJ;AAnBD,kEAmBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticator-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-instantiation.error.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,gDAAkD;
|
|
1
|
+
{"version":3,"file":"authenticator-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-instantiation.error.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,gDAAkD;AAGlD,MAAa,+BAAgC,SAAQ,sBAAa;IAG9D,YAAmB,OAAe,EAAE,yBAA4D,EAAE,oBAAyB;QACvH,KAAK,CAAC,OAAO,EAAE;YACX,yBAAyB;YACzB,oBAAoB;SACvB,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC;IAC3E,CAAC;CACJ;AAdD,0EAcC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-decorator.error.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,gDAAkD;
|
|
1
|
+
{"version":3,"file":"guard-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-decorator.error.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,gDAAkD;AAGlD,MAAa,mBAAoB,SAAQ,sBAAa;IAElD,YAAmB,OAAe,EAAE,KAAgC,EAAE,OAAY,EAAE,MAAW,EAC5E,WAAoB,EACpB,UAA+B;QAC9C,KAAK,CAAC,OAAO,EAAE;YACX,OAAO;YACP,KAAK;YACL,OAAO;YACP,MAAM;YACN,WAAW;YACX,UAAU;SACb,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC/D,CAAC;CACJ;AAnBD,kDAmBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-instantiation.error.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,gDAAkD;
|
|
1
|
+
{"version":3,"file":"guard-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-instantiation.error.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,gDAAkD;AAGlD,MAAa,uBAAwB,SAAQ,sBAAa;IACtD,YAAmB,OAAe,EAAE,iBAA4C,EAAE,YAAiB;QAC/F,KAAK,CAAC,OAAO,EAAE;YACX,iBAAiB;YACjB,YAAY;SACf,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACnE,CAAC;CACJ;AAZD,0DAYC"}
|
|
@@ -36,6 +36,9 @@ let RoleGuard = class RoleGuard {
|
|
|
36
36
|
var _a;
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
38
|
const neededRoles = [];
|
|
39
|
+
if (this.guardContext === undefined) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
39
42
|
if (this.guardContext.options && this.guardContext.options.hasOwnProperty("roles") && Array.isArray(this.guardContext.options.roles)) {
|
|
40
43
|
neededRoles.push(...this.guardContext.options.roles);
|
|
41
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role.guard.js","sourceRoot":"","sources":["../../../../src/guards/role.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAM5C,IAAa,SAAS,GAAtB,MAAa,SAAS;IAKlB,YAA0E,aAAqB;QAArB,kBAAa,GAAb,aAAa,CAAQ;QAJxF,YAAO,GAAG,MAAM,CAAC;IAKxB,CAAC;IAED,UAAU,CAAC,OAAY;QACnB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;QAE5B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAEK,YAAY,CAAC,OAAyB,EAAE,QAA4B;;;YACtE,MAAM,WAAW,GAAa,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"role.guard.js","sourceRoot":"","sources":["../../../../src/guards/role.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAM5C,IAAa,SAAS,GAAtB,MAAa,SAAS;IAKlB,YAA0E,aAAqB;QAArB,kBAAa,GAAb,aAAa,CAAQ;QAJxF,YAAO,GAAG,MAAM,CAAC;IAKxB,CAAC;IAED,UAAU,CAAC,OAAY;QACnB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;QAE5B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAEK,YAAY,CAAC,OAAyB,EAAE,QAA4B;;;YACtE,MAAM,WAAW,GAAa,EAAE,CAAC;YAEjC,IAAG,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;gBAChC,OAAO,KAAK,CAAC;aAChB;YAED,IAAG,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAAC;gBAChI,WAAW,CAAC,IAAI,CAAC,GAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;aACzD;YAED,IAAG,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,0CAAE,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,MAAK,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAC;gBAClJ,OAAO,KAAK,CAAC;aAChB;YACD,KAAI,MAAM,IAAI,IAAI,WAAW,EAAE;gBAC3B,IAAG,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA,EAAC;oBACpD,OAAO,KAAK,CAAC;iBAChB;aACJ;YACD,OAAO,IAAI,CAAC;;KACf;CACJ,CAAA;AAnCY,SAAS;IADrB,qBAAU,EAAE;IAMI,WAAA,iBAAM,CAAC,mCAAmC,CAAC,CAAA;;GAL/C,SAAS,CAmCrB;AAnCY,8BAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticator-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-decorator.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"authenticator-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-decorator.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAGlD,MAAM,OAAO,2BAA4B,SAAQ,aAAa;IAE1D,YAAmB,OAAe,EAAE,aAAgD,EAAE,OAAY,EAAE,MAAW,EAC5F,WAAoB,EACpB,UAA+B;QAC9C,KAAK,CAAC,OAAO,EAAE;YACX,OAAO;YACP,aAAa;YACb,OAAO;YACP,MAAM;YACN,WAAW;YACX,UAAU;SACb,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,2BAA2B,CAAC,SAAS,CAAC,CAAC;IACvE,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticator-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-instantiation.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"authenticator-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-instantiation.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAGlD,MAAM,OAAO,+BAAgC,SAAQ,aAAa;IAG9D,YAAmB,OAAe,EAAE,yBAA4D,EAAE,oBAAyB;QACvH,KAAK,CAAC,OAAO,EAAE;YACX,yBAAyB;YACzB,oBAAoB;SACvB,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC;IAC3E,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-decorator.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"guard-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-decorator.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAGlD,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IAElD,YAAmB,OAAe,EAAE,KAAgC,EAAE,OAAY,EAAE,MAAW,EAC5E,WAAoB,EACpB,UAA+B;QAC9C,KAAK,CAAC,OAAO,EAAE;YACX,OAAO;YACP,KAAK;YACL,OAAO;YACP,MAAM;YACN,WAAW;YACX,UAAU;SACb,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC/D,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-instantiation.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"guard-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-instantiation.error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAGlD,MAAM,OAAO,uBAAwB,SAAQ,aAAa;IACtD,YAAmB,OAAe,EAAE,iBAA4C,EAAE,YAAiB;QAC/F,KAAK,CAAC,OAAO,EAAE;YACX,iBAAiB;YACjB,YAAY;SACf,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACnE,CAAC;CACJ"}
|
|
@@ -33,6 +33,9 @@ let RoleGuard = class RoleGuard {
|
|
|
33
33
|
var _a;
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
const neededRoles = [];
|
|
36
|
+
if (this.guardContext === undefined) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
36
39
|
if (this.guardContext.options && this.guardContext.options.hasOwnProperty("roles") && Array.isArray(this.guardContext.options.roles)) {
|
|
37
40
|
neededRoles.push(...this.guardContext.options.roles);
|
|
38
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role.guard.js","sourceRoot":"","sources":["../../../../src/guards/role.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAM5C,IAAa,SAAS,GAAtB,MAAa,SAAS;IAKlB,YAA0E,aAAqB;QAArB,kBAAa,GAAb,aAAa,CAAQ;QAJxF,YAAO,GAAG,MAAM,CAAC;IAKxB,CAAC;IAED,UAAU,CAAC,OAAY;QACnB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;QAE5B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAEK,YAAY,CAAC,OAAyB,EAAE,QAA4B;;;YACtE,MAAM,WAAW,GAAa,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"role.guard.js","sourceRoot":"","sources":["../../../../src/guards/role.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAM5C,IAAa,SAAS,GAAtB,MAAa,SAAS;IAKlB,YAA0E,aAAqB;QAArB,kBAAa,GAAb,aAAa,CAAQ;QAJxF,YAAO,GAAG,MAAM,CAAC;IAKxB,CAAC;IAED,UAAU,CAAC,OAAY;QACnB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;QAE5B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAEK,YAAY,CAAC,OAAyB,EAAE,QAA4B;;;YACtE,MAAM,WAAW,GAAa,EAAE,CAAC;YAEjC,IAAG,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;gBAChC,OAAO,KAAK,CAAC;aAChB;YAED,IAAG,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAAC;gBAChI,WAAW,CAAC,IAAI,CAAC,GAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;aACzD;YAED,IAAG,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,0CAAE,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,MAAK,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAC;gBAClJ,OAAO,KAAK,CAAC;aAChB;YACD,KAAI,MAAM,IAAI,IAAI,WAAW,EAAE;gBAC3B,IAAG,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA,EAAC;oBACpD,OAAO,KAAK,CAAC;iBAChB;aACJ;YACD,OAAO,IAAI,CAAC;;KACf;CACJ,CAAA;AAnCY,SAAS;IADrB,UAAU,EAAE;IAMI,WAAA,MAAM,CAAC,mCAAmC,CAAC,CAAA;;GAL/C,SAAS,CAmCrB;SAnCY,SAAS"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* This Error is thrown when there's an error that happens when the guards ere being initialized
|
|
3
3
|
*/
|
|
4
4
|
import { LoggableError } from "@pristine-ts/common";
|
|
5
|
+
import { AuthenticatorInterface } from "../interfaces/authenticator.interface";
|
|
5
6
|
export declare class AuthenticatorDecoratorError extends LoggableError {
|
|
6
|
-
constructor(message: string, authenticator:
|
|
7
|
+
constructor(message: string, authenticator: AuthenticatorInterface | Function, options: any, target: any, propertyKey?: string, descriptor?: PropertyDescriptor);
|
|
7
8
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* This Error is thrown when there's an error that happens when the authenticator are being initialized
|
|
3
3
|
*/
|
|
4
4
|
import { LoggableError } from "@pristine-ts/common";
|
|
5
|
+
import { AuthenticatorInterface } from "../interfaces/authenticator.interface";
|
|
5
6
|
export declare class AuthenticatorInstantiationError extends LoggableError {
|
|
6
7
|
previousError?: Error;
|
|
7
|
-
constructor(message: string, instantiatedAuthenticator:
|
|
8
|
+
constructor(message: string, instantiatedAuthenticator: AuthenticatorInterface | Function, authenticatorContext: any);
|
|
8
9
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* This Error is thrown when there's an error that happens when the guards ere being initialized
|
|
3
3
|
*/
|
|
4
4
|
import { LoggableError } from "@pristine-ts/common";
|
|
5
|
+
import { GuardInterface } from "../interfaces/guard.interface";
|
|
5
6
|
export declare class GuardDecoratorError extends LoggableError {
|
|
6
|
-
constructor(message: string, guard:
|
|
7
|
+
constructor(message: string, guard: GuardInterface | Function, options: any, target: any, propertyKey?: string, descriptor?: PropertyDescriptor);
|
|
7
8
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* This Error is thrown when there's an error that happens when the guards ere being initialized
|
|
3
3
|
*/
|
|
4
4
|
import { LoggableError } from "@pristine-ts/common";
|
|
5
|
+
import { GuardInterface } from "../interfaces/guard.interface";
|
|
5
6
|
export declare class GuardInstantiationError extends LoggableError {
|
|
6
|
-
constructor(message: string, instantiatedGuard:
|
|
7
|
+
constructor(message: string, instantiatedGuard: GuardInterface | Function, guardContext: any);
|
|
7
8
|
}
|
|
@@ -4,7 +4,7 @@ import { GuardContextInterface } from "../interfaces/guard-context.interface";
|
|
|
4
4
|
export declare class RoleGuard implements GuardInterface {
|
|
5
5
|
private readonly rolesClaimKey;
|
|
6
6
|
keyname: string;
|
|
7
|
-
guardContext
|
|
7
|
+
guardContext?: GuardContextInterface;
|
|
8
8
|
constructor(rolesClaimKey: string);
|
|
9
9
|
setContext(context: any): Promise<void>;
|
|
10
10
|
isAuthorized(request: RequestInterface, identity?: IdentityInterface): Promise<boolean>;
|
|
@@ -3,6 +3,6 @@ import { IdentityInterface } from "@pristine-ts/common";
|
|
|
3
3
|
import { GuardContextInterface } from "./guard-context.interface";
|
|
4
4
|
export interface GuardInterface extends ContextAwareInterface {
|
|
5
5
|
keyname: string;
|
|
6
|
-
guardContext
|
|
6
|
+
guardContext?: GuardContextInterface;
|
|
7
7
|
isAuthorized(request: RequestInterface, identity?: IdentityInterface): Promise<boolean>;
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pristine-ts/security",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.171",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "dist/lib/esm/security.module.js",
|
|
6
6
|
"main": "dist/lib/cjs/security.module.js",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@pristine-ts/common": "^0.0.
|
|
23
|
-
"@pristine-ts/logging": "^0.0.
|
|
22
|
+
"@pristine-ts/common": "^0.0.171",
|
|
23
|
+
"@pristine-ts/logging": "^0.0.171"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/jsonwebtoken": "^8.5.0"
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"src/*.{js,ts}"
|
|
60
60
|
]
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "c4eaf7eff5917142595f2664f303c2fed7298259"
|
|
63
63
|
}
|