verben-authentication-ui 0.4.1 → 0.4.3

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.
Files changed (41) hide show
  1. package/esm2022/lib/components/role-control/role-control.component.mjs +131 -14
  2. package/esm2022/lib/components/sign-in/sign-in.component.mjs +40 -27
  3. package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.mjs +22 -22
  4. package/esm2022/lib/components/user-request/user-request.component.mjs +4 -4
  5. package/esm2022/lib/models/ApplicationRoleAction.mjs +2 -0
  6. package/esm2022/lib/models/ApplicationRoleContext.mjs +2 -0
  7. package/esm2022/lib/models/OAuthParam.mjs +2 -0
  8. package/esm2022/lib/models/OAuthType.mjs +9 -0
  9. package/esm2022/lib/models/Role.mjs +1 -1
  10. package/esm2022/lib/models/RoleAction.mjs +1 -1
  11. package/esm2022/lib/models/RoleContext.mjs +1 -1
  12. package/esm2022/lib/models/SearchOperator.mjs +6 -0
  13. package/esm2022/lib/models/SearchPropertySign.mjs +11 -0
  14. package/esm2022/lib/models/SearchPropertyValue.mjs +2 -0
  15. package/esm2022/lib/models/SearchPropertyValueType.mjs +11 -0
  16. package/esm2022/lib/models/TenantConfig.mjs +2 -0
  17. package/esm2022/lib/models/log-in.mjs +1 -1
  18. package/esm2022/lib/models/resend-otp-data.mjs +1 -1
  19. package/esm2022/lib/services/authorization.service.mjs +6 -4
  20. package/esm2022/lib/services/environment.service.mjs +1 -1
  21. package/fesm2022/verben-authentication-ui.mjs +208 -62
  22. package/fesm2022/verben-authentication-ui.mjs.map +1 -1
  23. package/lib/components/role-control/role-control.component.d.ts +16 -3
  24. package/lib/components/sign-in/sign-in.component.d.ts +4 -1
  25. package/lib/models/ApplicationRoleAction.d.ts +9 -0
  26. package/lib/models/ApplicationRoleContext.d.ts +9 -0
  27. package/lib/models/OAuthParam.d.ts +9 -0
  28. package/lib/models/OAuthType.d.ts +7 -0
  29. package/lib/models/Role.d.ts +1 -0
  30. package/lib/models/RoleAction.d.ts +2 -0
  31. package/lib/models/RoleContext.d.ts +2 -0
  32. package/lib/models/SearchOperator.d.ts +4 -0
  33. package/lib/models/SearchPropertySign.d.ts +9 -0
  34. package/lib/models/SearchPropertyValue.d.ts +10 -0
  35. package/lib/models/SearchPropertyValueType.d.ts +9 -0
  36. package/lib/models/TenantConfig.d.ts +18 -0
  37. package/lib/models/log-in.d.ts +1 -1
  38. package/lib/models/resend-otp-data.d.ts +1 -1
  39. package/lib/services/authorization.service.d.ts +1 -1
  40. package/lib/services/environment.service.d.ts +1 -0
  41. package/package.json +2 -3
@@ -5,11 +5,14 @@ import { Role } from '../../models/Role';
5
5
  import { RoleContext } from '../../models/RoleContext';
6
6
  import { RoleAction } from '../../models/RoleAction';
7
7
  import { MappedRole } from './MappedRole';
8
- import { AuthorizationService } from '../../services/authorization.service';
8
+ import { AuthorizationConfig, AuthorizationService } from '../../services/authorization.service';
9
9
  import { ChildrenType } from './ChildrenType';
10
10
  import { FormBuilder } from '@angular/forms';
11
11
  import { UtilService } from '../../services/util.service';
12
12
  import { HttpWebRequestService } from '../../services/http-web-request.service';
13
+ import { EnvironmentService } from '../../services/environment.service';
14
+ import { ApplicationRoleContext } from '../../models/ApplicationRoleContext';
15
+ import { ApplicationRoleAction } from '../../models/ApplicationRoleAction';
13
16
  import * as i0 from "@angular/core";
14
17
  export declare class RoleControlComponent implements OnInit {
15
18
  private authService;
@@ -18,6 +21,7 @@ export declare class RoleControlComponent implements OnInit {
18
21
  private server;
19
22
  private cdr;
20
23
  private fb;
24
+ private envSvc;
21
25
  visibleColumnDef: ColumnDefinition<MappedRole>[];
22
26
  styles: any;
23
27
  data: MappedRole[];
@@ -29,13 +33,22 @@ export declare class RoleControlComponent implements OnInit {
29
33
  cardContextHistoryData: CardData[][];
30
34
  cardDataView: CardDataViewComponent;
31
35
  dataView: DataViewComponent;
36
+ isGlobal: boolean;
37
+ serviceName: string | null;
38
+ application: string | null;
39
+ sourceData: AuthorizationConfig[];
32
40
  visibleColumns: IDataFilter[];
33
41
  filterArray: IDataFilter[];
34
42
  sortOptions: IDataFilter[];
35
43
  childPermissionRef: ChildrenType;
36
- constructor(authService: AuthorizationService, roleControlSvc: RoleControlService, utilService: UtilService, server: HttpWebRequestService, cdr: ChangeDetectorRef, fb: FormBuilder);
44
+ roleContextsStore: ApplicationRoleContext[];
45
+ roleActionsStore: ApplicationRoleAction[];
46
+ constructor(authService: AuthorizationService, roleControlSvc: RoleControlService, utilService: UtilService, server: HttpWebRequestService, cdr: ChangeDetectorRef, fb: FormBuilder, envSvc: EnvironmentService);
37
47
  ngOnInit(): Promise<void>;
48
+ getSavedContexts(): Promise<ApplicationRoleContext[] | undefined>;
38
49
  getAllRoles(): Promise<Role[] | undefined>;
50
+ getApplicationContextCode(name: string): string;
51
+ getApplicationActionCode(name: string): string;
39
52
  findParent(cardData: CardData[], target: CardData): CardData | null;
40
53
  isCheckboxDisabled(item: CardData): boolean;
41
54
  setUpMappedData(data: Role[]): void;
@@ -72,5 +85,5 @@ export declare class RoleControlComponent implements OnInit {
72
85
  randomActions(): RoleAction[];
73
86
  editValue(value: MappedRole): void;
74
87
  static ɵfac: i0.ɵɵFactoryDeclaration<RoleControlComponent, never>;
75
- static ɵcmp: i0.ɵɵComponentDeclaration<RoleControlComponent, "lib-role-control", never, {}, {}, never, never, false, never>;
88
+ static ɵcmp: i0.ɵɵComponentDeclaration<RoleControlComponent, "lib-role-control", never, { "isGlobal": { "alias": "isGlobal"; "required": false; }; "serviceName": { "alias": "serviceName"; "required": false; }; "application": { "alias": "application"; "required": false; }; }, {}, never, never, false, never>;
76
89
  }
@@ -9,6 +9,7 @@ import { EnvironmentService } from '../../services/environment.service';
9
9
  import { AuthMechanism } from '../../models/auth-mechanism';
10
10
  import { ActivatedRoute } from '@angular/router';
11
11
  import { IOauthResp } from '../../models/oauth-resp';
12
+ import { TenantConfig } from '../../models/TenantConfig';
12
13
  import * as i0 from "@angular/core";
13
14
  export declare class SignInComponent implements OnInit {
14
15
  private fb;
@@ -52,6 +53,7 @@ export declare class SignInComponent implements OnInit {
52
53
  onSubmitEnd: EventEmitter<ResponseKeyValue | ErrorResponse>;
53
54
  onGoogleAuthResponse: EventEmitter<ResponseKeyValue | ErrorResponse>;
54
55
  onSubmitGoogleAuth: EventEmitter<ResponseKeyValue | ErrorResponse>;
56
+ tenantConfigLoaded: EventEmitter<TenantConfig | null>;
55
57
  googleClick: EventEmitter<any>;
56
58
  microsoftClick: EventEmitter<any>;
57
59
  appleClick: EventEmitter<any>;
@@ -66,6 +68,7 @@ export declare class SignInComponent implements OnInit {
66
68
  type: string;
67
69
  mechanismType: string;
68
70
  OauthData: IOauthResp;
71
+ configData: TenantConfig | null;
69
72
  constructor(fb: FormBuilder, server: HttpWebRequestService, utilService: UtilService, envSvc: EnvironmentService, route: ActivatedRoute);
70
73
  ngOnInit(): Promise<void>;
71
74
  getTenantConfig(): Promise<void>;
@@ -85,5 +88,5 @@ export declare class SignInComponent implements OnInit {
85
88
  padding: string;
86
89
  };
87
90
  static ɵfac: i0.ɵɵFactoryDeclaration<SignInComponent, never>;
88
- 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>;
91
+ 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"; "tenantConfigLoaded": "tenantConfigLoaded"; "googleClick": "googleClick"; "microsoftClick": "microsoftClick"; "appleClick": "appleClick"; }, never, never, false, never>;
89
92
  }
@@ -0,0 +1,9 @@
1
+ import { BaseModel } from './base';
2
+ export interface ApplicationRoleAction extends BaseModel {
3
+ Name: string;
4
+ Description?: string;
5
+ Context: string;
6
+ Rule?: string;
7
+ Application: string;
8
+ APIKey: string;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { ApplicationRoleAction } from './ApplicationRoleAction';
2
+ import { BaseModel } from './base';
3
+ export interface ApplicationRoleContext extends BaseModel {
4
+ Name: string;
5
+ Description?: string;
6
+ Application: string;
7
+ RoleActions: ApplicationRoleAction[];
8
+ APIKey: string;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { OAuthType } from './OAuthType';
2
+ export interface OAuthParam {
3
+ AuthMechanism: OAuthType;
4
+ ClientId: string;
5
+ ClientSecret: string;
6
+ RedirectUri: string;
7
+ Scope?: string;
8
+ TenantId?: string;
9
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum OAuthType {
2
+ InApp = "InApp",
3
+ Google = "Google",
4
+ Facebook = "Facebook",
5
+ OAuth = "OAuth",
6
+ MicrosoftAD = "MicrosoftAD"
7
+ }
@@ -5,4 +5,5 @@ export interface Role extends BaseModel {
5
5
  Description?: string;
6
6
  Application?: string;
7
7
  RoleContexts: RoleContext[];
8
+ APIKey: string;
8
9
  }
@@ -5,4 +5,6 @@ export interface RoleAction extends BaseModel {
5
5
  Role: string;
6
6
  Context: string;
7
7
  Rule?: string;
8
+ APIKey: string;
9
+ ApplicationRoleAction: string;
8
10
  }
@@ -5,4 +5,6 @@ export interface RoleContext extends BaseModel {
5
5
  Description?: string;
6
6
  Role: string;
7
7
  RoleActions: RoleAction[];
8
+ APIKey: string;
9
+ ApplicationRoleContext: string;
8
10
  }
@@ -0,0 +1,4 @@
1
+ export declare enum SearchOperator {
2
+ And = "And",
3
+ Or = "Or"
4
+ }
@@ -0,0 +1,9 @@
1
+ export declare enum SearchPropertySign {
2
+ EQ = "EQ",
3
+ NEQ = "NEQ",
4
+ GT = "GT",
5
+ GTE = "GTE",
6
+ LT = "LT",
7
+ LTE = "LTE",
8
+ LIKE = "LIKE"
9
+ }
@@ -0,0 +1,10 @@
1
+ import { SearchOperator } from './SearchOperator';
2
+ import { SearchPropertySign } from './SearchPropertySign';
3
+ import { SearchPropertyValueType } from './SearchPropertyValueType';
4
+ export interface SearchPropertyValue {
5
+ PropertyName: string;
6
+ EntityValue: string;
7
+ Type?: SearchPropertyValueType;
8
+ Operator: SearchOperator;
9
+ Sign: SearchPropertySign;
10
+ }
@@ -0,0 +1,9 @@
1
+ export declare enum SearchPropertyValueType {
2
+ Int = "Int",
3
+ Float = "Float",
4
+ Decimal = "Decimal",
5
+ Double = "Double",
6
+ String = "String",
7
+ Bool = "Bool",
8
+ Date = "Date"
9
+ }
@@ -0,0 +1,18 @@
1
+ import { BaseModel } from './base';
2
+ import { OAuthParam } from './OAuthParam';
3
+ import { OAuthType } from './OAuthType';
4
+ export interface TenantConfig extends BaseModel {
5
+ Tenant: string;
6
+ Application: string;
7
+ PasswordPattern?: string;
8
+ PasswordPatternDescription?: string;
9
+ PasswordLength: number;
10
+ EnforceFirstLoginPassword: boolean;
11
+ AllowTwoFactorLogin: boolean;
12
+ CanPasswordExpired: boolean;
13
+ NoOfDaysForPasswordExpiraion: number;
14
+ LogOutInterval: number;
15
+ OTPValidFor: number;
16
+ AuthMechanism: OAuthType;
17
+ AuthMechanisms: OAuthParam[];
18
+ }
@@ -2,7 +2,7 @@ export interface LoginData {
2
2
  MailAddress: string;
3
3
  Password: string;
4
4
  LoginType: string;
5
- APIKey: string;
5
+ Tenant: string;
6
6
  Secrete: string;
7
7
  Token?: string;
8
8
  }
@@ -2,7 +2,7 @@ export interface ResendOtpData {
2
2
  MailAddress: string;
3
3
  Password: string;
4
4
  LoginType: string;
5
- APIKey: string;
5
+ Tenant: string;
6
6
  Secrete: string;
7
7
  RedirectUri: string;
8
8
  }
@@ -9,6 +9,6 @@ export declare class AuthorizationService {
9
9
  private auth;
10
10
  constructor(auth: AuthorizationConfig[]);
11
11
  get authorizationConfig(): AuthorizationConfig[];
12
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthorizationService, never>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthorizationService, [{ optional: true; }]>;
13
13
  static ɵprov: i0.ɵɵInjectableDeclaration<AuthorizationService>;
14
14
  }
@@ -4,6 +4,7 @@ export declare const ENVIRONMENT: InjectionToken<Environment>;
4
4
  export interface Environment {
5
5
  production: boolean;
6
6
  AuthenticationAPI: string;
7
+ Tenant: string;
7
8
  APIKey: string;
8
9
  Secret: string;
9
10
  }
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "verben-authentication-ui",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "peerDependencies": {
5
- "storage-encryption": "^1.0.16",
6
5
  "@angular/common": "^14.0.0 || ^18.0.0",
7
6
  "@angular/core": "^14.0.0 || ^18.0.0",
8
- "verben-ng-ui": "^0.2.2"
7
+ "verben-ng-ui": "^0.2.6"
9
8
  },
10
9
  "dependencies": {
11
10
  "tslib": "^2.3.0"