verben-authentication-ui 0.3.8 → 0.3.9
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/esm2022/lib/components/auth-callback/auth-callback.component.mjs +48 -0
- package/esm2022/lib/components/auth-callback/auth-callback.module.mjs +18 -0
- package/esm2022/lib/components/o-auth/o-auth.component.mjs +53 -81
- package/esm2022/lib/components/sign-in/sign-in.component.mjs +103 -35
- package/esm2022/lib/components/sign-up/sign-up.component.mjs +1 -1
- package/esm2022/lib/components/user-management/user-management.component.mjs +2 -2
- package/esm2022/lib/components/user-request/user-request.component.mjs +58 -61
- package/esm2022/lib/components/user-request-approval/user-request-approval.component.mjs +2 -2
- package/esm2022/lib/models/UserRequest.mjs +1 -1
- package/esm2022/lib/models/log-in.mjs +1 -1
- package/esm2022/lib/models/oauth-response.mjs +2 -0
- package/esm2022/lib/services/http-web-request.service.mjs +1 -2
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/verben-authentication-ui.mjs +271 -174
- package/fesm2022/verben-authentication-ui.mjs.map +1 -1
- package/lib/components/auth-callback/auth-callback.component.d.ts +17 -0
- package/lib/components/auth-callback/auth-callback.module.d.ts +8 -0
- package/lib/components/o-auth/o-auth.component.d.ts +10 -18
- package/lib/components/sign-in/sign-in.component.d.ts +17 -5
- package/lib/components/user-request/user-request.component.d.ts +6 -5
- package/lib/models/UserRequest.d.ts +2 -0
- package/lib/models/log-in.d.ts +1 -0
- package/lib/models/oauth-response.d.ts +6 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AuthCallbackComponent implements OnInit {
|
|
5
|
+
private router;
|
|
6
|
+
code: string;
|
|
7
|
+
previousUrl: string;
|
|
8
|
+
redirectText?: string;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
color: string;
|
|
12
|
+
constructor(router: Router);
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
handleRedirect(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthCallbackComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuthCallbackComponent, "verben-auth-callback", never, { "redirectText": { "alias": "redirectText"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, false, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./auth-callback.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class AuthCallbackModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthCallbackModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthCallbackModule, [typeof i1.AuthCallbackComponent], [typeof i2.CommonModule], [typeof i1.AuthCallbackComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AuthCallbackModule>;
|
|
8
|
+
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { AuthMechanism } from '../../models/auth-mechanism';
|
|
3
|
-
import { ActivatedRoute } from '@angular/router';
|
|
3
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
4
|
import { HttpWebRequestService } from '../../services/http-web-request.service';
|
|
5
5
|
import { UtilService } from '../../services/util.service';
|
|
6
|
-
import { EnvironmentService } from '../../services/environment.service';
|
|
7
|
-
import { ErrorResponse } from '../../models/ErrorResponse';
|
|
8
|
-
import { ResponseKeyValue } from '../../models/ResponseKeyValue';
|
|
9
6
|
import * as i0 from "@angular/core";
|
|
10
7
|
declare global {
|
|
11
8
|
interface Window {
|
|
@@ -16,29 +13,24 @@ export declare class OAuthComponent implements OnInit {
|
|
|
16
13
|
private route;
|
|
17
14
|
private server;
|
|
18
15
|
private utilService;
|
|
19
|
-
private
|
|
20
|
-
clientId: string;
|
|
16
|
+
private router;
|
|
21
17
|
showGoogle: boolean;
|
|
22
18
|
showMicrosoft: boolean;
|
|
23
19
|
showApple: boolean;
|
|
24
20
|
authMechanisms: AuthMechanism[] | null;
|
|
25
|
-
redirectUri: string;
|
|
26
|
-
apiKey?: string;
|
|
27
21
|
microsoftClick: EventEmitter<void>;
|
|
28
|
-
onSubmitGoogleAuth: EventEmitter<ResponseKeyValue | ErrorResponse>;
|
|
29
22
|
googleClick: EventEmitter<void>;
|
|
30
23
|
appleClick: EventEmitter<void>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
constructor(route: ActivatedRoute, server: HttpWebRequestService, utilService: UtilService, envSvc: EnvironmentService);
|
|
24
|
+
page: string;
|
|
25
|
+
constructor(route: ActivatedRoute, server: HttpWebRequestService, utilService: UtilService, router: Router);
|
|
34
26
|
ngOnInit(): void;
|
|
35
|
-
|
|
27
|
+
loadPage(): void;
|
|
36
28
|
loadGoogleScript(): void;
|
|
37
|
-
|
|
38
|
-
oAuthWithGoogle(): void;
|
|
39
|
-
exchangeCodeForToken(authCode: string): void;
|
|
40
|
-
handleCredentialResponse(response: any): void;
|
|
29
|
+
oAuthWithGoogle(data: AuthMechanism): void;
|
|
41
30
|
oAuthWithApple(): void;
|
|
31
|
+
oAuthWithMicrosoft(): void;
|
|
32
|
+
checkForValue(value: string): "" | "google-logo" | "apple-logo" | "microsoft-logo";
|
|
33
|
+
handleOauthClick(value: AuthMechanism): void | "";
|
|
42
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthComponent, never>;
|
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<OAuthComponent, "verben-o-auth", never, { "authMechanisms": { "alias": "authMechanisms"; "required": false; };
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OAuthComponent, "verben-o-auth", never, { "authMechanisms": { "alias": "authMechanisms"; "required": false; }; }, { "microsoftClick": "microsoftClick"; "googleClick": "googleClick"; "appleClick": "appleClick"; }, never, never, false, never>;
|
|
44
36
|
}
|
|
@@ -7,12 +7,20 @@ import { ErrorResponse } from '../../models/ErrorResponse';
|
|
|
7
7
|
import { ResponseKeyValue } from '../../models/ResponseKeyValue';
|
|
8
8
|
import { EnvironmentService } from '../../services/environment.service';
|
|
9
9
|
import { AuthMechanism } from '../../models/auth-mechanism';
|
|
10
|
+
import { ActivatedRoute } from '@angular/router';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
12
|
+
interface IOauthResp {
|
|
13
|
+
AccessToken: string;
|
|
14
|
+
Email: string;
|
|
15
|
+
FirstName: string;
|
|
16
|
+
LastName: string;
|
|
17
|
+
}
|
|
11
18
|
export declare class SignInComponent implements OnInit {
|
|
12
19
|
private fb;
|
|
13
20
|
private server;
|
|
14
21
|
private utilService;
|
|
15
22
|
private envSvc;
|
|
23
|
+
private route;
|
|
16
24
|
headlingText: string;
|
|
17
25
|
width: string;
|
|
18
26
|
maxWidth: string;
|
|
@@ -48,6 +56,7 @@ export declare class SignInComponent implements OnInit {
|
|
|
48
56
|
formSubmit: EventEmitter<LoginData>;
|
|
49
57
|
onSubmitEnd: EventEmitter<ResponseKeyValue | ErrorResponse>;
|
|
50
58
|
onGoogleAuthResponse: EventEmitter<ResponseKeyValue | ErrorResponse>;
|
|
59
|
+
onSubmitGoogleAuth: EventEmitter<ResponseKeyValue | ErrorResponse>;
|
|
51
60
|
googleClick: EventEmitter<any>;
|
|
52
61
|
microsoftClick: EventEmitter<any>;
|
|
53
62
|
appleClick: EventEmitter<any>;
|
|
@@ -58,15 +67,17 @@ export declare class SignInComponent implements OnInit {
|
|
|
58
67
|
apiKey: string;
|
|
59
68
|
secret: string;
|
|
60
69
|
isLoading: boolean;
|
|
61
|
-
|
|
62
|
-
|
|
70
|
+
code: string;
|
|
71
|
+
OauthData: IOauthResp;
|
|
72
|
+
constructor(fb: FormBuilder, server: HttpWebRequestService, utilService: UtilService, envSvc: EnvironmentService, route: ActivatedRoute);
|
|
73
|
+
ngOnInit(): Promise<void>;
|
|
63
74
|
getTenantConfig(): Promise<void>;
|
|
64
75
|
checkForm(): boolean;
|
|
65
|
-
|
|
76
|
+
verifyUserDetails(): Promise<void>;
|
|
77
|
+
submit(type: string): Promise<void>;
|
|
66
78
|
handleGoogleAuth(): void;
|
|
67
79
|
handleMicrosoft(): void;
|
|
68
80
|
handleAppleAuth(): void;
|
|
69
|
-
onSubmitGoogleAuth(data: ResponseKeyValue | ErrorResponse): void;
|
|
70
81
|
get styles(): {
|
|
71
82
|
'background-color': string;
|
|
72
83
|
'box-shadow': string;
|
|
@@ -80,5 +91,6 @@ export declare class SignInComponent implements OnInit {
|
|
|
80
91
|
padding: string;
|
|
81
92
|
};
|
|
82
93
|
static ɵfac: i0.ɵɵFactoryDeclaration<SignInComponent, never>;
|
|
83
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SignInComponent, "verben-sign-in", never, { "headlingText": { "alias": "headlingText"; "required": false; }; "width": { "alias": "width"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "pd": { "alias": "pd"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "headlingClass": { "alias": "headlingClass"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; "boxShadow": { "alias": "boxShadow"; "required": false; }; "border": { "alias": "border"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "height": { "alias": "height"; "required": false; }; "forgetPasswordClass": { "alias": "forgetPasswordClass"; "required": false; }; "requestAccessClass": { "alias": "requestAccessClass"; "required": false; }; "createAccountClass": { "alias": "createAccountClass"; "required": false; }; "createAccountLinkClass": { "alias": "createAccountLinkClass"; "required": false; }; "forgetPasswordLink": { "alias": "forgetPasswordLink"; "required": false; }; "createAccountLink": { "alias": "createAccountLink"; "required": false; }; "requestAccessLink": { "alias": "requestAccessLink"; "required": false; }; "btnClass": { "alias": "btnClass"; "required": false; }; "btnBgColor": { "alias": "btnBgColor"; "required": false; }; "btnColor": { "alias": "btnColor"; "required": false; }; "btnBorder": { "alias": "btnBorder"; "required": false; }; "btnBorderRadius": { "alias": "btnBorderRadius"; "required": false; }; "btnPd": { "alias": "btnPd"; "required": false; }; "btnText": { "alias": "btnText"; "required": false; }; "inputLabelColor": { "alias": "inputLabelColor"; "required": false; }; "inputBgColor": { "alias": "inputBgColor"; "required": false; }; "inputBorder": { "alias": "inputBorder"; "required": false; }; "inputBorderRadius": { "alias": "inputBorderRadius"; "required": false; }; "termsErrorText": { "alias": "termsErrorText"; "required": false; }; }, { "formSubmit": "formSubmit"; "onSubmitEnd": "onSubmitEnd"; "onGoogleAuthResponse": "onGoogleAuthResponse"; "googleClick": "googleClick"; "microsoftClick": "microsoftClick"; "appleClick": "appleClick"; }, never, never, false, never>;
|
|
94
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SignInComponent, "verben-sign-in", never, { "headlingText": { "alias": "headlingText"; "required": false; }; "width": { "alias": "width"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "pd": { "alias": "pd"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "headlingClass": { "alias": "headlingClass"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; "boxShadow": { "alias": "boxShadow"; "required": false; }; "border": { "alias": "border"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "height": { "alias": "height"; "required": false; }; "forgetPasswordClass": { "alias": "forgetPasswordClass"; "required": false; }; "requestAccessClass": { "alias": "requestAccessClass"; "required": false; }; "createAccountClass": { "alias": "createAccountClass"; "required": false; }; "createAccountLinkClass": { "alias": "createAccountLinkClass"; "required": false; }; "forgetPasswordLink": { "alias": "forgetPasswordLink"; "required": false; }; "createAccountLink": { "alias": "createAccountLink"; "required": false; }; "requestAccessLink": { "alias": "requestAccessLink"; "required": false; }; "btnClass": { "alias": "btnClass"; "required": false; }; "btnBgColor": { "alias": "btnBgColor"; "required": false; }; "btnColor": { "alias": "btnColor"; "required": false; }; "btnBorder": { "alias": "btnBorder"; "required": false; }; "btnBorderRadius": { "alias": "btnBorderRadius"; "required": false; }; "btnPd": { "alias": "btnPd"; "required": false; }; "btnText": { "alias": "btnText"; "required": false; }; "inputLabelColor": { "alias": "inputLabelColor"; "required": false; }; "inputBgColor": { "alias": "inputBgColor"; "required": false; }; "inputBorder": { "alias": "inputBorder"; "required": false; }; "inputBorderRadius": { "alias": "inputBorderRadius"; "required": false; }; "termsErrorText": { "alias": "termsErrorText"; "required": false; }; }, { "formSubmit": "formSubmit"; "onSubmitEnd": "onSubmitEnd"; "onGoogleAuthResponse": "onGoogleAuthResponse"; "onSubmitGoogleAuth": "onSubmitGoogleAuth"; "googleClick": "googleClick"; "microsoftClick": "microsoftClick"; "appleClick": "appleClick"; }, never, never, false, never>;
|
|
84
95
|
}
|
|
96
|
+
export {};
|
|
@@ -3,6 +3,8 @@ import { AbstractControl, FormBuilder, FormGroup, ValidationErrors } from '@angu
|
|
|
3
3
|
import { HttpWebRequestService } from '../../services/http-web-request.service';
|
|
4
4
|
import { UserRequestPayload } from '../../models/UserRequest';
|
|
5
5
|
import { UtilService } from '../../services/util.service';
|
|
6
|
+
import { ResponseKeyValue } from '../../models/ResponseKeyValue';
|
|
7
|
+
import { ErrorResponse } from '../../models/ErrorResponse';
|
|
6
8
|
import { EnvironmentService } from '../../services/environment.service';
|
|
7
9
|
import { AuthMechanism } from '../../models/auth-mechanism';
|
|
8
10
|
import { ActivatedRoute } from '@angular/router';
|
|
@@ -26,7 +28,6 @@ export declare class UserRequestComponent {
|
|
|
26
28
|
pd: string;
|
|
27
29
|
isFormEditable: boolean;
|
|
28
30
|
apiKey: string;
|
|
29
|
-
userRequestModel: UserRequestPayload;
|
|
30
31
|
isCode: boolean;
|
|
31
32
|
text: string;
|
|
32
33
|
color: string;
|
|
@@ -43,6 +44,7 @@ export declare class UserRequestComponent {
|
|
|
43
44
|
onSubmitSuccess: EventEmitter<any>;
|
|
44
45
|
appleClick: EventEmitter<any>;
|
|
45
46
|
microsoftClick: EventEmitter<any>;
|
|
47
|
+
onSubmitGoogleAuth: EventEmitter<ResponseKeyValue | ErrorResponse>;
|
|
46
48
|
onSubmitResponseEnd: EventEmitter<any>;
|
|
47
49
|
userRequestForm: FormGroup;
|
|
48
50
|
tenantDetails: any | null;
|
|
@@ -62,15 +64,14 @@ export declare class UserRequestComponent {
|
|
|
62
64
|
height: string;
|
|
63
65
|
padding: string;
|
|
64
66
|
};
|
|
65
|
-
ngOnInit(): void
|
|
67
|
+
ngOnInit(): Promise<void>;
|
|
66
68
|
getTenantConfig(): Promise<void>;
|
|
67
69
|
checkForm(): boolean;
|
|
68
70
|
handleGoogleAuth(): void;
|
|
69
71
|
handleAppleAuth(): void;
|
|
70
72
|
handleMicrosoft(): void;
|
|
71
|
-
newModel(): UserRequestPayload;
|
|
72
|
-
UserDetails(): Promise<void>;
|
|
73
73
|
submitForm(): Promise<void>;
|
|
74
|
+
verifyUserDetails(): Promise<void>;
|
|
74
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserRequestComponent, never>;
|
|
75
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UserRequestComponent, "lib-user-request", never, { "width": { "alias": "width"; "required": false; }; "headingTitle": { "alias": "headingTitle"; "required": false; }; "headingClass": { "alias": "headingClass"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; "boxShadow": { "alias": "boxShadow"; "required": false; }; "border": { "alias": "border"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "height": { "alias": "height"; "required": false; }; "pd": { "alias": "pd"; "required": false; }; "text": { "alias": "text"; "required": false; }; "color": { "alias": "color"; "required": false; }; "btnBorder": { "alias": "btnBorder"; "required": false; }; "btnBorderRadius": { "alias": "btnBorderRadius"; "required": false; }; "btnBgColor": { "alias": "btnBgColor"; "required": false; }; "btnWidth": { "alias": "btnWidth"; "required": false; }; "btnPd": { "alias": "btnPd"; "required": false; }; "termsLink": { "alias": "termsLink"; "required": false; }; "privacyLink": { "alias": "privacyLink"; "required": false; }; "routerLink": { "alias": "routerLink"; "required": false; }; }, { "formSubmit": "formSubmit"; "googleClick": "googleClick"; "onSubmitSuccess": "onSubmitSuccess"; "appleClick": "appleClick"; "microsoftClick": "microsoftClick"; "onSubmitResponseEnd": "onSubmitResponseEnd"; }, never, never, false, never>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserRequestComponent, "lib-user-request", never, { "width": { "alias": "width"; "required": false; }; "headingTitle": { "alias": "headingTitle"; "required": false; }; "headingClass": { "alias": "headingClass"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; "boxShadow": { "alias": "boxShadow"; "required": false; }; "border": { "alias": "border"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "height": { "alias": "height"; "required": false; }; "pd": { "alias": "pd"; "required": false; }; "text": { "alias": "text"; "required": false; }; "color": { "alias": "color"; "required": false; }; "btnBorder": { "alias": "btnBorder"; "required": false; }; "btnBorderRadius": { "alias": "btnBorderRadius"; "required": false; }; "btnBgColor": { "alias": "btnBgColor"; "required": false; }; "btnWidth": { "alias": "btnWidth"; "required": false; }; "btnPd": { "alias": "btnPd"; "required": false; }; "termsLink": { "alias": "termsLink"; "required": false; }; "privacyLink": { "alias": "privacyLink"; "required": false; }; "routerLink": { "alias": "routerLink"; "required": false; }; }, { "formSubmit": "formSubmit"; "googleClick": "googleClick"; "onSubmitSuccess": "onSubmitSuccess"; "appleClick": "appleClick"; "microsoftClick": "microsoftClick"; "onSubmitGoogleAuth": "onSubmitGoogleAuth"; "onSubmitResponseEnd": "onSubmitResponseEnd"; }, never, never, false, never>;
|
|
76
77
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MechanismType } from "./auth-mechanism";
|
|
1
2
|
import { ObjectState } from "./object-state";
|
|
2
3
|
import { RequestStatus } from "./request-status";
|
|
3
4
|
import { Status } from "./status";
|
|
@@ -19,6 +20,7 @@ export interface UserRequestPayload {
|
|
|
19
20
|
TenantId: string;
|
|
20
21
|
ServiceName: string;
|
|
21
22
|
ActionBy: string;
|
|
23
|
+
SignUpType: MechanismType;
|
|
22
24
|
RequestStatus: RequestStatus;
|
|
23
25
|
Comment: string;
|
|
24
26
|
}
|
package/lib/models/log-in.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -26,4 +26,6 @@ export * from './lib/components/user-request-approval/user-request-approval.comp
|
|
|
26
26
|
export * from './lib/components/user-management/useer-management.module';
|
|
27
27
|
export * from './lib/components/user-management/user-management.component';
|
|
28
28
|
export * from './lib/components/user-request-approval/user-request-approval.service';
|
|
29
|
+
export * from './lib/components/auth-callback/auth-callback.component';
|
|
30
|
+
export * from './lib/components/auth-callback/auth-callback.module';
|
|
29
31
|
export * from './lib/services/environment.service';
|