@recursyve/nice-auth0-kit 13.0.0-beta.3 → 13.0.0-beta.6
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/esm2020/lib/api/authorization/authorization.api.mjs +40 -0
- package/esm2020/lib/api/authorization/models/authorization-flow-request.model.mjs +2 -0
- package/esm2020/lib/api/authorization/models/authorization-flow-response.model.mjs +7 -0
- package/esm2020/lib/api/nice-auth0.service.mjs +7 -4
- package/esm2020/lib/api/token/token.api.mjs +18 -2
- package/esm2020/lib/providers/authentication.service.mjs +62 -12
- package/fesm2015/recursyve-nice-auth0-kit.mjs +126 -17
- package/fesm2015/recursyve-nice-auth0-kit.mjs.map +1 -1
- package/fesm2020/recursyve-nice-auth0-kit.mjs +129 -23
- package/fesm2020/recursyve-nice-auth0-kit.mjs.map +1 -1
- package/lib/api/authorization/authorization.api.d.ts +12 -0
- package/lib/api/authorization/models/authorization-flow-request.model.d.ts +4 -0
- package/lib/api/authorization/models/authorization-flow-response.model.d.ts +9 -0
- package/lib/api/nice-auth0.service.d.ts +3 -1
- package/lib/api/token/token.api.d.ts +1 -0
- package/lib/providers/authentication.service.d.ts +11 -2
- package/package.json +3 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BehaviorSubject, Observable } from "rxjs";
|
|
2
|
-
import { NiceAuth0Service } from "../api
|
|
2
|
+
import { NiceAuth0Service } from "../api";
|
|
3
|
+
import { AuthorizationFlowResponse } from "../api/authorization/models/authorization-flow-response.model";
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export interface LoginResponse {
|
|
5
6
|
success: boolean;
|
|
@@ -13,6 +14,10 @@ export interface EmailAuthenticator {
|
|
|
13
14
|
type: "email";
|
|
14
15
|
email: string;
|
|
15
16
|
}
|
|
17
|
+
export interface AuthorizationFlowOptions {
|
|
18
|
+
connection?: string;
|
|
19
|
+
useStateValidation?: boolean;
|
|
20
|
+
}
|
|
16
21
|
export declare class NiceAuthenticationService {
|
|
17
22
|
private auth0Service;
|
|
18
23
|
private lastMfaChallengeToken;
|
|
@@ -32,11 +37,15 @@ export declare class NiceAuthenticationService {
|
|
|
32
37
|
getAccessToken(): Observable<string>;
|
|
33
38
|
validateToken(): boolean;
|
|
34
39
|
passwordGrant(username: string, password: string): Observable<LoginResponse>;
|
|
40
|
+
authorizationCodeGrant(code: string, redirectUrl: string): Observable<LoginResponse>;
|
|
41
|
+
getAuthFlowRequestUri(redirectUrl: string, options?: AuthorizationFlowOptions): Observable<string>;
|
|
42
|
+
checkAuthFlowResponse(expectedResponsePath?: string): Observable<AuthorizationFlowResponse | null>;
|
|
35
43
|
validateOobCode(code: string): Observable<void>;
|
|
36
44
|
logout(): Observable<void>;
|
|
37
45
|
generateNewToken(): Observable<string>;
|
|
38
46
|
addMfaAuthenticator(authenticator: SmsAuthenticator | EmailAuthenticator): Observable<void>;
|
|
39
|
-
|
|
47
|
+
triggerMfaChallenge(): Observable<void>;
|
|
48
|
+
private catchGrantError;
|
|
40
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceAuthenticationService, never>;
|
|
41
50
|
static ɵprov: i0.ɵɵInjectableDeclaration<NiceAuthenticationService>;
|
|
42
51
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@recursyve/nice-auth0-kit",
|
|
3
|
-
"version": "13.0.0-beta.
|
|
3
|
+
"version": "13.0.0-beta.6",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^13.0.0",
|
|
6
|
-
"@angular/core": "^13.0.0"
|
|
6
|
+
"@angular/core": "^13.0.0",
|
|
7
|
+
"uuid": "^8.0.0"
|
|
7
8
|
},
|
|
8
9
|
"dependencies": {
|
|
9
10
|
"tslib": "^2.3.0",
|