pico-auth 0.0.26 → 0.0.27
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/pico-auth.d.ts +15 -0
- package/package.json +1 -1
package/dist/pico-auth.d.ts
CHANGED
|
@@ -15,7 +15,11 @@ declare module "core/auth" {
|
|
|
15
15
|
canImpersonate(user: any, target: string): Promise<any>;
|
|
16
16
|
impersonateOrg(user: any, target: string): Promise<any>;
|
|
17
17
|
}
|
|
18
|
+
export interface ScratchCardProvider {
|
|
19
|
+
consume(user: BaseUser, cardCode: string): Promise<BaseUser>;
|
|
20
|
+
}
|
|
18
21
|
export interface BaseUser {
|
|
22
|
+
id?: string;
|
|
19
23
|
blocked?: boolean;
|
|
20
24
|
[key: string]: any;
|
|
21
25
|
}
|
|
@@ -23,6 +27,17 @@ declare module "core/auth" {
|
|
|
23
27
|
* When mfaToken is provided
|
|
24
28
|
*/
|
|
25
29
|
export const authenticate: (login: string, password: string, mfaToken: string, impersonateEntity: string, userProvider: UserProvider, impersonateProvider: any, jwtSpecs: JWTSpecs) => Promise<any>;
|
|
30
|
+
/**
|
|
31
|
+
* Allows to login using scratch card. As scratch card may provide a different user to log in to
|
|
32
|
+
* it also allows to impersonate someone using scratch card.
|
|
33
|
+
* @param requesterLogin
|
|
34
|
+
* @param cardCode
|
|
35
|
+
* @param userProvider
|
|
36
|
+
* @param scratchCardProvider
|
|
37
|
+
* @param jwtSpecs
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
export const authenticateWithScratchCard: (requesterLogin: string, cardCode: string, userProvider: UserProvider, scratchCardProvider: ScratchCardProvider, jwtSpecs: JWTSpecs) => Promise<any>;
|
|
26
41
|
/**
|
|
27
42
|
* Will prepare user for MFA activation. Next step is to call verify with token generated in MFA app by the user.
|
|
28
43
|
*/
|