@pristine-ts/security 0.0.186 → 0.0.190
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/decorators/authenticator.decorator.js +6 -0
- package/dist/lib/cjs/decorators/authenticator.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/guard.decorator.js +6 -0
- package/dist/lib/cjs/decorators/guard.decorator.js.map +1 -1
- package/dist/lib/cjs/enums/resource-action.enum.js +5 -0
- package/dist/lib/cjs/enums/resource-action.enum.js.map +1 -1
- package/dist/lib/cjs/enums/vote.enum.js +3 -0
- package/dist/lib/cjs/enums/vote.enum.js.map +1 -1
- package/dist/lib/cjs/enums/voting-strategy.enum.js +10 -0
- package/dist/lib/cjs/enums/voting-strategy.enum.js.map +1 -1
- package/dist/lib/cjs/errors/authenticator-decorator.error.js +2 -2
- package/dist/lib/cjs/errors/authenticator-decorator.error.js.map +1 -1
- package/dist/lib/cjs/errors/authenticator-instantiation.error.js +1 -1
- package/dist/lib/cjs/errors/authenticator-instantiation.error.js.map +1 -1
- package/dist/lib/cjs/errors/errors.js +1 -0
- package/dist/lib/cjs/errors/errors.js.map +1 -1
- package/dist/lib/cjs/errors/guard-decorator.error.js +1 -1
- package/dist/lib/cjs/errors/guard-decorator.error.js.map +1 -1
- package/dist/lib/cjs/errors/guard-instantiation.error.js +1 -1
- package/dist/lib/cjs/errors/guard-instantiation.error.js.map +1 -1
- package/dist/lib/cjs/factories/authenticator.factory.js +11 -0
- package/dist/lib/cjs/factories/authenticator.factory.js.map +1 -1
- package/dist/lib/cjs/factories/guard.factory.js +11 -0
- package/dist/lib/cjs/factories/guard.factory.js.map +1 -1
- package/dist/lib/cjs/guards/role.guard.js +26 -0
- package/dist/lib/cjs/guards/role.guard.js.map +1 -1
- package/dist/lib/cjs/interfaces/interfaces.js +2 -0
- package/dist/lib/cjs/interfaces/interfaces.js.map +1 -1
- package/dist/lib/cjs/managers/authentication.manager.js +16 -1
- package/dist/lib/cjs/managers/authentication.manager.js.map +1 -1
- package/dist/lib/cjs/managers/authorizer.manager.js +16 -0
- package/dist/lib/cjs/managers/authorizer.manager.js.map +1 -1
- package/dist/lib/cjs/managers/managers.js +1 -1
- package/dist/lib/cjs/managers/managers.js.map +1 -1
- package/dist/lib/cjs/managers/permission.manager.js +16 -0
- package/dist/lib/cjs/managers/permission.manager.js.map +1 -1
- package/dist/lib/cjs/providers/default-identity.provider.js +2 -0
- package/dist/lib/cjs/providers/default-identity.provider.js.map +1 -1
- package/dist/lib/cjs/security.module.js +3 -0
- package/dist/lib/cjs/security.module.js.map +1 -1
- package/dist/lib/esm/decorators/authenticator.decorator.js +6 -0
- package/dist/lib/esm/decorators/authenticator.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/guard.decorator.js +6 -0
- package/dist/lib/esm/decorators/guard.decorator.js.map +1 -1
- package/dist/lib/esm/enums/resource-action.enum.js +5 -0
- package/dist/lib/esm/enums/resource-action.enum.js.map +1 -1
- package/dist/lib/esm/enums/vote.enum.js +3 -0
- package/dist/lib/esm/enums/vote.enum.js.map +1 -1
- package/dist/lib/esm/enums/voting-strategy.enum.js +10 -0
- package/dist/lib/esm/enums/voting-strategy.enum.js.map +1 -1
- package/dist/lib/esm/errors/authenticator-decorator.error.js +2 -2
- package/dist/lib/esm/errors/authenticator-decorator.error.js.map +1 -1
- package/dist/lib/esm/errors/authenticator-instantiation.error.js +1 -1
- package/dist/lib/esm/errors/authenticator-instantiation.error.js.map +1 -1
- package/dist/lib/esm/errors/errors.js +1 -0
- package/dist/lib/esm/errors/errors.js.map +1 -1
- package/dist/lib/esm/errors/guard-decorator.error.js +1 -1
- package/dist/lib/esm/errors/guard-decorator.error.js.map +1 -1
- package/dist/lib/esm/errors/guard-instantiation.error.js +1 -1
- package/dist/lib/esm/errors/guard-instantiation.error.js.map +1 -1
- package/dist/lib/esm/factories/authenticator.factory.js +11 -0
- package/dist/lib/esm/factories/authenticator.factory.js.map +1 -1
- package/dist/lib/esm/factories/guard.factory.js +11 -0
- package/dist/lib/esm/factories/guard.factory.js.map +1 -1
- package/dist/lib/esm/guards/role.guard.js +26 -0
- package/dist/lib/esm/guards/role.guard.js.map +1 -1
- package/dist/lib/esm/interfaces/interfaces.js +2 -0
- package/dist/lib/esm/interfaces/interfaces.js.map +1 -1
- package/dist/lib/esm/managers/authentication.manager.js +16 -1
- package/dist/lib/esm/managers/authentication.manager.js.map +1 -1
- package/dist/lib/esm/managers/authorizer.manager.js +16 -0
- package/dist/lib/esm/managers/authorizer.manager.js.map +1 -1
- package/dist/lib/esm/managers/managers.js +1 -1
- package/dist/lib/esm/managers/managers.js.map +1 -1
- package/dist/lib/esm/managers/permission.manager.js +16 -0
- package/dist/lib/esm/managers/permission.manager.js.map +1 -1
- package/dist/lib/esm/providers/default-identity.provider.js +2 -0
- package/dist/lib/esm/providers/default-identity.provider.js.map +1 -1
- package/dist/lib/esm/security.module.js +3 -0
- package/dist/lib/esm/security.module.js.map +1 -1
- package/dist/types/decorators/authenticator.decorator.d.ts +6 -0
- package/dist/types/decorators/guard.decorator.d.ts +6 -0
- package/dist/types/enums/resource-action.enum.d.ts +5 -0
- package/dist/types/enums/vote.enum.d.ts +3 -0
- package/dist/types/enums/voting-strategy.enum.d.ts +10 -0
- package/dist/types/errors/authenticator-decorator.error.d.ts +3 -3
- package/dist/types/errors/authenticator-instantiation.error.d.ts +2 -2
- package/dist/types/errors/errors.d.ts +1 -0
- package/dist/types/errors/guard-decorator.error.d.ts +2 -2
- package/dist/types/errors/guard-instantiation.error.d.ts +2 -2
- package/dist/types/factories/authenticator.factory.d.ts +9 -0
- package/dist/types/factories/guard.factory.d.ts +9 -0
- package/dist/types/guards/role.guard.d.ts +24 -0
- package/dist/types/interfaces/authentication-manager.interface.d.ts +11 -0
- package/dist/types/interfaces/authenticator-context.interface.d.ts +12 -0
- package/dist/types/interfaces/authenticator.interface.d.ts +9 -0
- package/dist/types/interfaces/authorizer-manager.interface.d.ts +11 -0
- package/dist/types/interfaces/guard-context.interface.d.ts +13 -0
- package/dist/types/interfaces/guard.interface.d.ts +15 -0
- package/dist/types/interfaces/identity-provider.interface.d.ts +9 -0
- package/dist/types/interfaces/interfaces.d.ts +2 -0
- package/dist/types/interfaces/voter.interface.d.ts +14 -0
- package/dist/types/managers/authentication.manager.d.ts +16 -0
- package/dist/types/managers/authorizer.manager.d.ts +16 -0
- package/dist/types/managers/managers.d.ts +1 -1
- package/dist/types/managers/permission.manager.d.ts +16 -0
- package/dist/types/providers/default-identity.provider.d.ts +2 -0
- package/package.json +4 -4
|
@@ -2,11 +2,35 @@ import { IdentityInterface } from "@pristine-ts/common";
|
|
|
2
2
|
import { GuardInterface } from "../interfaces/guard.interface";
|
|
3
3
|
import { GuardContextInterface } from "../interfaces/guard-context.interface";
|
|
4
4
|
import { Request } from "@pristine-ts/common";
|
|
5
|
+
/**
|
|
6
|
+
* The role guard is a guard that validates if the identity making the request has the required roles.
|
|
7
|
+
*/
|
|
5
8
|
export declare class RoleGuard implements GuardInterface {
|
|
6
9
|
private readonly rolesClaimKey;
|
|
10
|
+
/**
|
|
11
|
+
* The keyname of the guard.
|
|
12
|
+
*/
|
|
7
13
|
keyname: string;
|
|
14
|
+
/**
|
|
15
|
+
* The context for the guard to use.
|
|
16
|
+
*/
|
|
8
17
|
guardContext?: GuardContextInterface;
|
|
18
|
+
/**
|
|
19
|
+
* The role guard is a guard that validates if the identity making the request has the required roles.
|
|
20
|
+
* @param rolesClaimKey The key in the claims of the access token where the roles are defined.
|
|
21
|
+
*/
|
|
9
22
|
constructor(rolesClaimKey: string);
|
|
23
|
+
/**
|
|
24
|
+
* Sets the context for the guard.
|
|
25
|
+
* @param context The context for the guard to use.
|
|
26
|
+
*/
|
|
10
27
|
setContext(context: any): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Returns whether or not the guard authorizes the request.
|
|
30
|
+
* For the role guard, it validates that the identity making the request has the requested roles.
|
|
31
|
+
* The identity needs all of the requested roles to be authorized.
|
|
32
|
+
* @param request The request to authorize.
|
|
33
|
+
* @param identity The identity making the request.
|
|
34
|
+
*/
|
|
11
35
|
isAuthorized(request: Request, identity?: IdentityInterface): Promise<boolean>;
|
|
12
36
|
}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { DependencyContainer } from "tsyringe";
|
|
2
2
|
import { IdentityInterface } from "@pristine-ts/common";
|
|
3
3
|
import { Request } from "@pristine-ts/common";
|
|
4
|
+
/**
|
|
5
|
+
* The Authentication Manager Interface defines what the authentication manager should implement.
|
|
6
|
+
* It facilitates mocking.
|
|
7
|
+
*/
|
|
4
8
|
export interface AuthenticationManagerInterface {
|
|
9
|
+
/**
|
|
10
|
+
* Authenticates a request.
|
|
11
|
+
* @param request The request.
|
|
12
|
+
* @param routeContext The context for the route.
|
|
13
|
+
* @param container The dependency container.
|
|
14
|
+
* @returns { IdentityInterface | undefined } The identity making the request if available. Otherwise undefined.
|
|
15
|
+
*/
|
|
5
16
|
authenticate(request: Request, routeContext: any, container: DependencyContainer): Promise<IdentityInterface | undefined>;
|
|
6
17
|
}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { AuthenticatorInterface } from "./authenticator.interface";
|
|
2
|
+
/**
|
|
3
|
+
* The Authenticator Context Interface defines what the context of an authenticator should have.
|
|
4
|
+
*/
|
|
2
5
|
export interface AuthenticatorContextInterface {
|
|
6
|
+
/**
|
|
7
|
+
* The name of the constructor of the authenticator.
|
|
8
|
+
*/
|
|
3
9
|
constructorName: string;
|
|
10
|
+
/**
|
|
11
|
+
* The actual authenticator.
|
|
12
|
+
*/
|
|
4
13
|
authenticator: AuthenticatorInterface | Function;
|
|
14
|
+
/**
|
|
15
|
+
* The options to be used by the authenticator.
|
|
16
|
+
*/
|
|
5
17
|
options: any;
|
|
6
18
|
}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { IdentityInterface } from "@pristine-ts/common";
|
|
2
2
|
import { ContextAwareInterface } from "@pristine-ts/common";
|
|
3
3
|
import { Request } from "@pristine-ts/common";
|
|
4
|
+
/**
|
|
5
|
+
* The Authenticator Interface defines what an authenticator should implement.
|
|
6
|
+
* It extends the ContextAwareInterface.
|
|
7
|
+
*/
|
|
4
8
|
export interface AuthenticatorInterface extends ContextAwareInterface {
|
|
9
|
+
/**
|
|
10
|
+
* Authenticates the request by providing the identity making the request if it exists.
|
|
11
|
+
* @param request The request to authenticate.
|
|
12
|
+
* @returns {IdentityInterface | undefined} The Identity making the request if it exists
|
|
13
|
+
*/
|
|
5
14
|
authenticate(request: Request): Promise<IdentityInterface | undefined>;
|
|
6
15
|
}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { DependencyContainer } from "tsyringe";
|
|
2
2
|
import { IdentityInterface } from "@pristine-ts/common";
|
|
3
3
|
import { Request } from "@pristine-ts/common";
|
|
4
|
+
/**
|
|
5
|
+
* The Authentication Manager Interface defines what the authentication manager should implement.
|
|
6
|
+
* It facilitates mocking.
|
|
7
|
+
*/
|
|
4
8
|
export interface AuthorizerManagerInterface {
|
|
9
|
+
/**
|
|
10
|
+
* Returns whether or not the request is authorized to access the route.
|
|
11
|
+
* @param request The request.
|
|
12
|
+
* @param routeContext The context associated with the route.
|
|
13
|
+
* @param container The dependency container.
|
|
14
|
+
* @param identity The identity making the request.
|
|
15
|
+
*/
|
|
5
16
|
isAuthorized(request: Request, routeContext: any, container: DependencyContainer, identity?: IdentityInterface): Promise<boolean>;
|
|
6
17
|
}
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { GuardInterface } from "./guard.interface";
|
|
2
|
+
/**
|
|
3
|
+
* The Guard Context Interface defines what a guard should implement.
|
|
4
|
+
* It extends the ContextAwareInterface.
|
|
5
|
+
*/
|
|
2
6
|
export interface GuardContextInterface {
|
|
7
|
+
/**
|
|
8
|
+
* The constructor name of the class of the guard.
|
|
9
|
+
*/
|
|
3
10
|
constructorName: string;
|
|
11
|
+
/**
|
|
12
|
+
* The actual guard.
|
|
13
|
+
*/
|
|
4
14
|
guard: GuardInterface | Function;
|
|
15
|
+
/**
|
|
16
|
+
* The options for the guard to use.
|
|
17
|
+
*/
|
|
5
18
|
options: any;
|
|
6
19
|
}
|
|
@@ -2,8 +2,23 @@ import { ContextAwareInterface } from "@pristine-ts/common";
|
|
|
2
2
|
import { IdentityInterface } from "@pristine-ts/common";
|
|
3
3
|
import { GuardContextInterface } from "./guard-context.interface";
|
|
4
4
|
import { Request } from "@pristine-ts/common";
|
|
5
|
+
/**
|
|
6
|
+
* The Guard Interface defines what a guard should implement.
|
|
7
|
+
* It extends the ContextAwareInterface.
|
|
8
|
+
*/
|
|
5
9
|
export interface GuardInterface extends ContextAwareInterface {
|
|
10
|
+
/**
|
|
11
|
+
* The keyname for the guard.
|
|
12
|
+
*/
|
|
6
13
|
keyname: string;
|
|
14
|
+
/**
|
|
15
|
+
* The context for the guard to use.
|
|
16
|
+
*/
|
|
7
17
|
guardContext?: GuardContextInterface;
|
|
18
|
+
/**
|
|
19
|
+
* Returns whether the guard authorizes the request to access the route or not.
|
|
20
|
+
* @param request The request ot authorize.
|
|
21
|
+
* @param identity The identity making the request.
|
|
22
|
+
*/
|
|
8
23
|
isAuthorized(request: Request, identity?: IdentityInterface): Promise<boolean>;
|
|
9
24
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { IdentityInterface } from "@pristine-ts/common";
|
|
2
|
+
/**
|
|
3
|
+
* The Identity Provider Interface defines what an Identity provider should implement.
|
|
4
|
+
* This is useful if you need to define your own Identity object that extends the IdentityInterface.
|
|
5
|
+
* You can provide your own IdentityProvider.
|
|
6
|
+
*/
|
|
2
7
|
export interface IdentityProviderInterface {
|
|
8
|
+
/**
|
|
9
|
+
* Provides the identity from the base Identity that was extracted from the request.
|
|
10
|
+
* @param identity The identity that was extracted from the request.
|
|
11
|
+
*/
|
|
3
12
|
provide(identity: IdentityInterface): Promise<IdentityInterface>;
|
|
4
13
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "./authentication-manager.interface";
|
|
2
2
|
export * from "./authenticator.interface";
|
|
3
|
+
export * from "./authenticator-context.interface";
|
|
3
4
|
export * from "./authorizer-manager.interface";
|
|
4
5
|
export * from "./guard.interface";
|
|
5
6
|
export * from "./guard-context.interface";
|
|
7
|
+
export * from "./identity-provider.interface";
|
|
6
8
|
export * from "./voter.interface";
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { VoteEnum } from "../enums/vote.enum";
|
|
2
2
|
import { IdentityInterface } from "@pristine-ts/common";
|
|
3
|
+
/**
|
|
4
|
+
* The voter interface defines what a voter should implement.
|
|
5
|
+
* A voter is used to vote whether or not the identity should be allowed to execute an action on a resource.
|
|
6
|
+
*/
|
|
3
7
|
export interface VoterInterface {
|
|
8
|
+
/**
|
|
9
|
+
* Whether or not the voter supports that type of resource.
|
|
10
|
+
* @param resource The resource.
|
|
11
|
+
*/
|
|
4
12
|
supports(resource: object): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Votes on whether or not the identity should be allowed to execute an action on a resource.
|
|
15
|
+
* @param identity The identity executing the action.
|
|
16
|
+
* @param action The action that the identity is trying to execute.
|
|
17
|
+
* @param resource The resource on which the action is executed.
|
|
18
|
+
*/
|
|
5
19
|
vote(identity: IdentityInterface, action: string, resource: object): Promise<VoteEnum>;
|
|
6
20
|
}
|
|
@@ -5,10 +5,26 @@ import { LogHandlerInterface } from "@pristine-ts/logging";
|
|
|
5
5
|
import { AuthenticatorFactory } from "../factories/authenticator.factory";
|
|
6
6
|
import { IdentityProviderInterface } from "../interfaces/identity-provider.interface";
|
|
7
7
|
import { Request } from "@pristine-ts/common";
|
|
8
|
+
/**
|
|
9
|
+
* The authentication manager provides authentication by returning the identity executing the action.
|
|
10
|
+
* It is tagged and can be injected using AuthenticationManagerInterface which facilitates mocking.
|
|
11
|
+
*/
|
|
8
12
|
export declare class AuthenticationManager implements AuthenticationManagerInterface {
|
|
9
13
|
private readonly identityProviders;
|
|
10
14
|
private readonly logHandler;
|
|
11
15
|
private readonly authenticatorFactory;
|
|
16
|
+
/**
|
|
17
|
+
* The authentication manager provides authentication by returning the identity executing the action.
|
|
18
|
+
* @param identityProviders The identity providers to use to provide the identity. All services tagged with ServiceDefinitionTagEnum.IdentityProvider will be injected here.
|
|
19
|
+
* @param logHandler The log handler to output logs.
|
|
20
|
+
* @param authenticatorFactory The factory to create the authenticator.
|
|
21
|
+
*/
|
|
12
22
|
constructor(identityProviders: IdentityProviderInterface[], logHandler: LogHandlerInterface, authenticatorFactory: AuthenticatorFactory);
|
|
23
|
+
/**
|
|
24
|
+
* Authenticates a request by providing the identity that made the request.
|
|
25
|
+
* @param request The request to authenticate
|
|
26
|
+
* @param routeContext The context associated with the route.
|
|
27
|
+
* @param container The dependency container from which to resolve the authenticator.
|
|
28
|
+
*/
|
|
13
29
|
authenticate(request: Request, routeContext: any, container: DependencyContainer): Promise<IdentityInterface | undefined>;
|
|
14
30
|
}
|
|
@@ -4,9 +4,25 @@ import { IdentityInterface } from "@pristine-ts/common";
|
|
|
4
4
|
import { AuthorizerManagerInterface } from "../interfaces/authorizer-manager.interface";
|
|
5
5
|
import { GuardFactory } from "../factories/guard.factory";
|
|
6
6
|
import { Request } from "@pristine-ts/common";
|
|
7
|
+
/**
|
|
8
|
+
* The authorizer manager provides authorization by authorizing the action.
|
|
9
|
+
* It is tagged and can be injected using AuthorizerManagerInterface which facilitates mocking.
|
|
10
|
+
*/
|
|
7
11
|
export declare class AuthorizerManager implements AuthorizerManagerInterface {
|
|
8
12
|
private readonly logHandler;
|
|
9
13
|
private readonly guardFactory;
|
|
14
|
+
/**
|
|
15
|
+
* The authorizer manager provides authorization by authorizing the action.
|
|
16
|
+
* @param logHandler The log handler to output logs.
|
|
17
|
+
* @param guardFactory The factory to create the guard.
|
|
18
|
+
*/
|
|
10
19
|
constructor(logHandler: LogHandlerInterface, guardFactory: GuardFactory);
|
|
20
|
+
/**
|
|
21
|
+
* Returns whether or not the request is authorized to access the route.
|
|
22
|
+
* @param request The request to authorize.
|
|
23
|
+
* @param routeContext The route context.
|
|
24
|
+
* @param container The dependency container to resolve the guard from.
|
|
25
|
+
* @param identity The identity making the request.
|
|
26
|
+
*/
|
|
11
27
|
isAuthorized(request: Request, routeContext: any, container: DependencyContainer, identity?: IdentityInterface): Promise<boolean>;
|
|
12
28
|
}
|
|
@@ -2,9 +2,25 @@ import { VoterInterface } from "../interfaces/voter.interface";
|
|
|
2
2
|
import { VotingStrategyEnum } from "../enums/voting-strategy.enum";
|
|
3
3
|
import { LogHandlerInterface } from "@pristine-ts/logging";
|
|
4
4
|
import { IdentityInterface } from "@pristine-ts/common";
|
|
5
|
+
/**
|
|
6
|
+
* The permission manager verifies if the correct permission are there to access and take an action on a resource.
|
|
7
|
+
*/
|
|
5
8
|
export declare class PermissionManager {
|
|
6
9
|
private readonly voters;
|
|
7
10
|
private readonly logHandler;
|
|
11
|
+
/**
|
|
12
|
+
* The permission manager verifies if the correct permission are there to access and take an action on a resource.
|
|
13
|
+
* @param voters The voters that determine if access is granted.
|
|
14
|
+
* All services with the tag ServiceDefinitionTagEnum.Voter will be injected here
|
|
15
|
+
* @param logHandler The log handler to output logs.
|
|
16
|
+
*/
|
|
8
17
|
constructor(voters: VoterInterface[], logHandler: LogHandlerInterface);
|
|
18
|
+
/**
|
|
19
|
+
* Returns whether or not the permission manager grants access to the resource.
|
|
20
|
+
* @param identity The identity trying to have access to a resource.
|
|
21
|
+
* @param action The action trying to be executed on the resource.
|
|
22
|
+
* @param resource The resource being accessed.
|
|
23
|
+
* @param votingStrategy The voting strategy that defines how to merge the votes. Default is DenyOnUnanimousAbstention.
|
|
24
|
+
*/
|
|
9
25
|
hasAccessToResource(identity: IdentityInterface, action: string, resource: object, votingStrategy?: VotingStrategyEnum): Promise<boolean>;
|
|
10
26
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { IdentityInterface } from "@pristine-ts/common";
|
|
2
2
|
import { IdentityProviderInterface } from "../interfaces/identity-provider.interface";
|
|
3
3
|
/**
|
|
4
|
+
* This default identity provider is here so that there is always at least one service tagged with IdentityProvider
|
|
4
5
|
* Until there's a fix for: https://github.com/microsoft/tsyringe/issues/63
|
|
6
|
+
* It resolves the same identity it is passed.
|
|
5
7
|
*/
|
|
6
8
|
export declare class DefaultIdentityProvider implements IdentityProviderInterface {
|
|
7
9
|
provide(identity: IdentityInterface): Promise<IdentityInterface>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pristine-ts/security",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.190",
|
|
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.190",
|
|
23
|
+
"@pristine-ts/logging": "^0.0.190"
|
|
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": "b3a54c2748face44898cbd15d479c72eea834719"
|
|
63
63
|
}
|