@arsedizioni/ars-utils 18.4.3 → 18.4.5
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/clipper.common/common/services/clipper.service.d.ts +1 -1
- package/esm2022/clipper.common/common/interceptors/auth.interceptor.mjs +1 -1
- package/esm2022/clipper.common/common/services/clipper.service.mjs +20 -16
- package/esm2022/ui.oauth/ui/components/login/login-oauth.component.mjs +8 -5
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +19 -15
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +7 -4
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/package.json +7 -7
- package/ui.oauth/ui/components/login/login-oauth.component.d.ts +5 -2
|
@@ -60,8 +60,11 @@ class LoginOAuthComponent {
|
|
|
60
60
|
this.msaLService = inject(MsalService);
|
|
61
61
|
this.ngZone = inject(NgZone);
|
|
62
62
|
this.success = new EventEmitter();
|
|
63
|
-
this.
|
|
63
|
+
this.showInfo = input(true);
|
|
64
|
+
this.applicationName = input();
|
|
64
65
|
this.autoInitialize = input(false);
|
|
66
|
+
this.allowMicrosoft = input(true);
|
|
67
|
+
this.allowGoogle = input(true);
|
|
65
68
|
this.oauthReady = signal(false);
|
|
66
69
|
this.oauthMicrosoftReady = signal(false);
|
|
67
70
|
this.oauthGoogleReady = signal(false);
|
|
@@ -146,7 +149,7 @@ class LoginOAuthComponent {
|
|
|
146
149
|
googleButtonWrapper.click();
|
|
147
150
|
}
|
|
148
151
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: LoginOAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
149
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
152
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: LoginOAuthComponent, isStandalone: true, selector: "login-oauth", inputs: { showInfo: { classPropertyName: "showInfo", publicName: "showInfo", isSignal: true, isRequired: false, transformFunction: null }, applicationName: { classPropertyName: "applicationName", publicName: "applicationName", isSignal: true, isRequired: false, transformFunction: null }, autoInitialize: { classPropertyName: "autoInitialize", publicName: "autoInitialize", isSignal: true, isRequired: false, transformFunction: null }, allowMicrosoft: { classPropertyName: "allowMicrosoft", publicName: "allowMicrosoft", isSignal: true, isRequired: false, transformFunction: null }, allowGoogle: { classPropertyName: "allowGoogle", publicName: "allowGoogle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { success: "success" }, providers: [{
|
|
150
153
|
provide: MSAL_INSTANCE,
|
|
151
154
|
deps: [EnvironmentService],
|
|
152
155
|
useFactory: MSALInstanceFactory
|
|
@@ -161,7 +164,7 @@ class LoginOAuthComponent {
|
|
|
161
164
|
useFactory: MSALInterceptorConfigFactory
|
|
162
165
|
},
|
|
163
166
|
MsalService,
|
|
164
|
-
MsalBroadcastService], ngImport: i0, template: "<div class=\"login-oauth\">\r\n <div class=\"message\">\r\n <p>Questa sezione consente di accedere al servizio utilizzando un provider OAuth2.</p>\r\n <p>La email utilizzata deve essere collegata ad un utente valido di {{
|
|
167
|
+
MsalBroadcastService], ngImport: i0, template: "<div class=\"login-oauth\">\r\n @if(showInfo()) {\r\n <div class=\"message\">\r\n <p>Questa sezione consente di accedere al servizio utilizzando un provider OAuth2.</p>\r\n @if(applicationName()) {\r\n <p>La email utilizzata deve essere collegata ad un utente valido di {{applicationName()}} e dei servizi ad esso\r\n connessi.</p>\r\n }\r\n </div>\r\n }\r\n @if (allowMicrosoft()) {\r\n <div class=\"button\">\r\n <button mat-flat-button color=\"primary\" (click)=\"loginMSAL()\" [attr.aria-label]=\"'Effettua accesso'\"\r\n [disabled]=\"!oauthMicrosoftReady()\" style=\"width: 100%;\">\r\n Accedi con Microsoft</button>\r\n </div>\r\n }\r\n @if (allowGoogle()) {\r\n <div class=\"button\">\r\n <button mat-flat-button color=\"primary\" (click)=\"loginGoogle()\" style=\"width: 100%;\"\r\n [attr.aria-label]=\"'Effettua accesso'\" [disabled]=\"!oauthGoogleReady()\">\r\n Accedi con Google</button>\r\n </div>\r\n }\r\n</div>", styles: [".login-oauth{text-align:center}.login-oauth .button{padding:10px 0;width:100%}.login-oauth .message{padding:0 0 10px!important;font-size:small}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
165
168
|
}
|
|
166
169
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: LoginOAuthComponent, decorators: [{
|
|
167
170
|
type: Component,
|
|
@@ -182,7 +185,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
182
185
|
MsalService,
|
|
183
186
|
MsalBroadcastService], imports: [
|
|
184
187
|
MatButtonModule
|
|
185
|
-
], template: "<div class=\"login-oauth\">\r\n <div class=\"message\">\r\n <p>Questa sezione consente di accedere al servizio utilizzando un provider OAuth2.</p>\r\n <p>La email utilizzata deve essere collegata ad un utente valido di {{
|
|
188
|
+
], template: "<div class=\"login-oauth\">\r\n @if(showInfo()) {\r\n <div class=\"message\">\r\n <p>Questa sezione consente di accedere al servizio utilizzando un provider OAuth2.</p>\r\n @if(applicationName()) {\r\n <p>La email utilizzata deve essere collegata ad un utente valido di {{applicationName()}} e dei servizi ad esso\r\n connessi.</p>\r\n }\r\n </div>\r\n }\r\n @if (allowMicrosoft()) {\r\n <div class=\"button\">\r\n <button mat-flat-button color=\"primary\" (click)=\"loginMSAL()\" [attr.aria-label]=\"'Effettua accesso'\"\r\n [disabled]=\"!oauthMicrosoftReady()\" style=\"width: 100%;\">\r\n Accedi con Microsoft</button>\r\n </div>\r\n }\r\n @if (allowGoogle()) {\r\n <div class=\"button\">\r\n <button mat-flat-button color=\"primary\" (click)=\"loginGoogle()\" style=\"width: 100%;\"\r\n [attr.aria-label]=\"'Effettua accesso'\" [disabled]=\"!oauthGoogleReady()\">\r\n Accedi con Google</button>\r\n </div>\r\n }\r\n</div>", styles: [".login-oauth{text-align:center}.login-oauth .button{padding:10px 0;width:100%}.login-oauth .message{padding:0 0 10px!important;font-size:small}\n"] }]
|
|
186
189
|
}], propDecorators: { success: [{
|
|
187
190
|
type: Output
|
|
188
191
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arsedizioni-ars-utils-ui.oauth.mjs","sources":["../../../projects/ars-utils/ui.oauth/ui/definitions.ts","../../../projects/ars-utils/ui.oauth/ui/ui.module.ts","../../../projects/ars-utils/ui.oauth/ui/components/login/login-oauth.component.ts","../../../projects/ars-utils/ui.oauth/ui/components/login/login-oauth.component.html","../../../projects/ars-utils/ui.oauth/public_api.ts","../../../projects/ars-utils/ui.oauth/arsedizioni-ars-utils-ui.oauth.ts"],"sourcesContent":["export enum LoginOAuthType {\r\n None = 0,\r\n Microsoft = 1,\r\n Google = 2\r\n}\r\n\r\nexport interface LoginOAuthResult {\r\n type: number,\r\n token: string\r\n}","import { NgModule } from \"@angular/core\";\r\n\r\n// Material\r\n\r\n@NgModule()\r\nexport class ArsUIOAuthModule { }\r\n\r\nexport * from \"./definitions\";\r\n\r\n\r\n","import { ChangeDetectionStrategy, Component, EventEmitter, NgZone, OnDestroy, OnInit, Output, inject, input, signal } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { EnvironmentService } from '@arsedizioni/ars-utils/core';\r\nimport { MSAL_GUARD_CONFIG, MSAL_INSTANCE, MSAL_INTERCEPTOR_CONFIG, MsalBroadcastService, MsalGuardConfiguration, MsalInterceptorConfiguration, MsalService } from '@azure/msal-angular';\r\nimport { AuthenticationResult, BrowserCacheLocation, EventMessage, EventType, IPublicClientApplication, InteractionType, PublicClientApplication } from '@azure/msal-browser';\r\nimport { Subject, filter, takeUntil } from 'rxjs';\r\nimport { LoginOAuthResult } from '../../definitions';\r\n\r\nexport function MSALInstanceFactory(environment: EnvironmentService): IPublicClientApplication {\r\n return new PublicClientApplication({\r\n auth: {\r\n clientId: \"6b2c080f-6ab0-4511-a9df-0bce69db5833\",\r\n authority: \"https://login.microsoftonline.com/common\",\r\n redirectUri: environment.appUri, // This is your redir\r\n },\r\n cache: {\r\n cacheLocation: BrowserCacheLocation.LocalStorage\r\n }\r\n });\r\n}\r\n\r\nexport function MSALInterceptorConfigFactory(environment: EnvironmentService): MsalInterceptorConfiguration {\r\n \r\n return {\r\n interactionType: InteractionType.Popup,\r\n protectedResourceMap: new Map([\r\n [environment.appServiceUri + '/login', [\"api://6b2c080f-6ab0-4511-a9df-0bce69db5833/AngularSPAAuthScope\"]],\r\n [\"https://graph.microsoft.com/v2.0/me\", [\"user.read\"]],\r\n ])\r\n };\r\n}\r\n\r\nexport function MSALGuardConfigFactory(): MsalGuardConfiguration {\r\n return {\r\n interactionType: InteractionType.Popup,\r\n authRequest: {\r\n scopes: [\"user.read\"]\r\n }\r\n };\r\n}\r\n\r\n@Component({\r\n selector: 'login-oauth',\r\n templateUrl: './login-oauth.component.html',\r\n styleUrls: ['./login-oauth.component.scss'],\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [{\r\n provide: MSAL_INSTANCE,\r\n deps:[EnvironmentService],\r\n useFactory: MSALInstanceFactory\r\n },\r\n {\r\n provide: MSAL_GUARD_CONFIG,\r\n useFactory: MSALGuardConfigFactory\r\n },\r\n {\r\n provide: MSAL_INTERCEPTOR_CONFIG,\r\n deps:[EnvironmentService],\r\n useFactory: MSALInterceptorConfigFactory\r\n },\r\n MsalService,\r\n MsalBroadcastService],\r\n imports: [\r\n MatButtonModule\r\n ]\r\n})\r\nexport class LoginOAuthComponent implements OnInit, OnDestroy {\r\n private unsubscribe: Subject<void> = new Subject<void>();\r\n private msalBroadcastService = inject(MsalBroadcastService);\r\n private msaLService = inject(MsalService);\r\n private ngZone = inject(NgZone);\r\n\r\n @Output() success = new EventEmitter<LoginOAuthResult>();\r\n\r\n appName = input<string | null>();\r\n autoInitialize = input<boolean | null>(false);\r\n\r\n\r\n protected oauthReady = signal<boolean>(false);\r\n protected oauthMicrosoftReady = signal<boolean>(false);\r\n protected oauthGoogleReady = signal<boolean>(false);\r\n\r\n\r\n ngOnInit() {\r\n if (this.autoInitialize()) {\r\n this.initialize();\r\n }\r\n this.msalBroadcastService.msalSubject$\r\n .pipe(\r\n filter((msg: EventMessage) => msg.eventType === EventType.ACQUIRE_TOKEN_SUCCESS),\r\n takeUntil(this.unsubscribe)\r\n )\r\n .subscribe((r: any) => { \r\n if (r) {\r\n this.success.emit({ type: 1, token: r.payload.accessToken });\r\n }\r\n });\r\n\r\n }\r\n\r\n ngOnDestroy() {\r\n this.unsubscribe.next();\r\n this.unsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Initialize open authentication \r\n * Must be a public method \r\n */\r\n initialize() {\r\n if (this.oauthReady()) {\r\n return; // Already done\r\n }\r\n this.oauthReady.set(true);\r\n\r\n // Load MS stack\r\n this.msaLService.initialize()\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe(() => {\r\n this.oauthMicrosoftReady.set(true);\r\n });\r\n\r\n // Load google maps script after view init\r\n const DSLScript = document.createElement('script');\r\n DSLScript.src = 'https://accounts.google.com/gsi/client';\r\n DSLScript.type = 'text/javascript';\r\n document.body.appendChild(DSLScript);\r\n document.body.removeChild(DSLScript);\r\n\r\n // @ts-ignore\r\n window.onGoogleLibraryLoad = () => {\r\n // initialize google account\r\n // @ts-ignore\r\n google.accounts.id.initialize({\r\n client_id: '71204983077-ag31h3bgt2udcbfr9nn84r9rni2k3snp.apps.googleusercontent.com',\r\n cancel_on_tap_outside: true,\r\n auto_select: false,\r\n callback: (r: any) => {\r\n this.ngZone.run(() => {\r\n this.success.emit({ type: 2, token: r.credential });\r\n });\r\n }\r\n });\r\n\r\n googleButtonWrapper = createFakeGoogleWrapper();\r\n\r\n this.oauthGoogleReady.set(true);\r\n };\r\n\r\n }\r\n\r\n /**\r\n * Perform login using MSAL\r\n */\r\n protected loginMSAL() {\r\n this.msaLService.loginPopup()\r\n .subscribe({\r\n next: (r: AuthenticationResult) => {\r\n this.msaLService.instance.setActiveAccount(r.account);\r\n this.msaLService.acquireTokenSilent({\r\n scopes: [\r\n \"api://6b2c080f-6ab0-4511-a9df-0bce69db5833/AngularSPAAuthScope\"\r\n ],\r\n account: r.account\r\n })\r\n }\r\n });\r\n }\r\n\r\n /**\r\n* Perform login using Google\r\n*/\r\n protected loginGoogle() {\r\n // Use wrapper click to prevent Illegal invocation exception\r\n googleButtonWrapper.click();\r\n }\r\n}\r\n\r\nconst createFakeGoogleWrapper = () => {\r\n const googleLoginWrapper = document.createElement(\"div\");\r\n // Or you can simple hide it in CSS rule for custom-google-button\r\n googleLoginWrapper.style.display = \"none\";\r\n googleLoginWrapper.classList.add(\"custom-google-button\");\r\n\r\n // Add the wrapper to body\r\n document.body.appendChild(googleLoginWrapper);\r\n\r\n // Use GSI javascript api to render the button inside our wrapper\r\n // You can ignore the properties because this button will not appear\r\n // @ts-ignore\r\n window.google.accounts.id.renderButton(googleLoginWrapper, {\r\n type: \"icon\",\r\n width: \"200\",\r\n });\r\n\r\n const googleLoginWrapperButton =\r\n googleLoginWrapper.querySelector(\"div[role=button]\");\r\n\r\n return {\r\n click: () => {\r\n // @ts-ignore\r\n googleLoginWrapperButton.click();\r\n },\r\n };\r\n};\r\nvar googleButtonWrapper: any = null;\r\n\r\n","<div class=\"login-oauth\">\r\n <div class=\"message\">\r\n <p>Questa sezione consente di accedere al servizio utilizzando un provider OAuth2.</p>\r\n <p>La email utilizzata deve essere collegata ad un utente valido di {{appName()}} e dei servizi ad esso connessi.</p>\r\n </div>\r\n <div class=\"button\">\r\n <button mat-flat-button color=\"primary\" (click)=\"loginMSAL()\" [attr.aria-label]=\"'Effettua accesso'\"\r\n [disabled]=\"!oauthMicrosoftReady()\" style=\"width: 100%;\">\r\n Accedi con Microsoft</button>\r\n </div>\r\n <div class=\"button\">\r\n <button mat-flat-button color=\"primary\" (click)=\"loginGoogle()\" style=\"width: 100%;\"\r\n [attr.aria-label]=\"'Effettua accesso'\" [disabled]=\"!oauthGoogleReady()\">\r\n Accedi con Google</button>\r\n </div>\r\n</div>","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './ui/ui.module';\r\nexport * from './ui/components/login/login-oauth.component';\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;IAAY,eAIX;AAJD,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;AACR,IAAA,cAAA,CAAA,cAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAa,CAAA;AACb,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU,CAAA;AACZ,CAAC,EAJW,cAAc,KAAd,cAAc,GAIzB,EAAA,CAAA,CAAA;;ACFD;MAGa,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAhB,gBAAgB,EAAA,CAAA,CAAA,EAAA;+GAAhB,gBAAgB,EAAA,CAAA,CAAA,EAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,QAAQ;;;ACIH,SAAU,mBAAmB,CAAC,WAA+B,EAAA;IACjE,OAAO,IAAI,uBAAuB,CAAC;AACjC,QAAA,IAAI,EAAE;AACJ,YAAA,QAAQ,EAAE,sCAAsC;AAChD,Y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AEvD,OAAO;QACL,KAAK,EAAE,MAAK;;YAEV,wBAAwB,CAAC,KAAK,EAAE,CAAC;SAClC;KACF,CAAC;AACJ,CAAC,CAAC;AACF,IAAI,mBAAmB,GAAQ,IAAI;;AE9MnC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"arsedizioni-ars-utils-ui.oauth.mjs","sources":["../../../projects/ars-utils/ui.oauth/ui/definitions.ts","../../../projects/ars-utils/ui.oauth/ui/ui.module.ts","../../../projects/ars-utils/ui.oauth/ui/components/login/login-oauth.component.ts","../../../projects/ars-utils/ui.oauth/ui/components/login/login-oauth.component.html","../../../projects/ars-utils/ui.oauth/public_api.ts","../../../projects/ars-utils/ui.oauth/arsedizioni-ars-utils-ui.oauth.ts"],"sourcesContent":["export enum LoginOAuthType {\r\n None = 0,\r\n Microsoft = 1,\r\n Google = 2\r\n}\r\n\r\nexport interface LoginOAuthResult {\r\n type: number,\r\n token: string\r\n}","import { NgModule } from \"@angular/core\";\r\n\r\n// Material\r\n\r\n@NgModule()\r\nexport class ArsUIOAuthModule { }\r\n\r\nexport * from \"./definitions\";\r\n\r\n\r\n","import { ChangeDetectionStrategy, Component, EventEmitter, NgZone, OnDestroy, OnInit, Output, inject, input, signal } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { EnvironmentService } from '@arsedizioni/ars-utils/core';\r\nimport { MSAL_GUARD_CONFIG, MSAL_INSTANCE, MSAL_INTERCEPTOR_CONFIG, MsalBroadcastService, MsalGuardConfiguration, MsalInterceptorConfiguration, MsalService } from '@azure/msal-angular';\r\nimport { AuthenticationResult, BrowserCacheLocation, EventMessage, EventType, IPublicClientApplication, InteractionType, PublicClientApplication } from '@azure/msal-browser';\r\nimport { Subject, filter, takeUntil } from 'rxjs';\r\nimport { LoginOAuthResult } from '../../definitions';\r\n\r\nexport function MSALInstanceFactory(environment: EnvironmentService): IPublicClientApplication {\r\n return new PublicClientApplication({\r\n auth: {\r\n clientId: \"6b2c080f-6ab0-4511-a9df-0bce69db5833\",\r\n authority: \"https://login.microsoftonline.com/common\",\r\n redirectUri: environment.appUri, // This is your redir\r\n },\r\n cache: {\r\n cacheLocation: BrowserCacheLocation.LocalStorage\r\n }\r\n });\r\n}\r\n\r\nexport function MSALInterceptorConfigFactory(environment: EnvironmentService): MsalInterceptorConfiguration {\r\n \r\n return {\r\n interactionType: InteractionType.Popup,\r\n protectedResourceMap: new Map([\r\n [environment.appServiceUri + '/login', [\"api://6b2c080f-6ab0-4511-a9df-0bce69db5833/AngularSPAAuthScope\"]],\r\n [\"https://graph.microsoft.com/v2.0/me\", [\"user.read\"]],\r\n ])\r\n };\r\n}\r\n\r\nexport function MSALGuardConfigFactory(): MsalGuardConfiguration {\r\n return {\r\n interactionType: InteractionType.Popup,\r\n authRequest: {\r\n scopes: [\"user.read\"]\r\n }\r\n };\r\n}\r\n\r\n@Component({\r\n selector: 'login-oauth',\r\n templateUrl: './login-oauth.component.html',\r\n styleUrls: ['./login-oauth.component.scss'],\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [{\r\n provide: MSAL_INSTANCE,\r\n deps:[EnvironmentService],\r\n useFactory: MSALInstanceFactory\r\n },\r\n {\r\n provide: MSAL_GUARD_CONFIG,\r\n useFactory: MSALGuardConfigFactory\r\n },\r\n {\r\n provide: MSAL_INTERCEPTOR_CONFIG,\r\n deps:[EnvironmentService],\r\n useFactory: MSALInterceptorConfigFactory\r\n },\r\n MsalService,\r\n MsalBroadcastService],\r\n imports: [\r\n MatButtonModule\r\n ]\r\n})\r\nexport class LoginOAuthComponent implements OnInit, OnDestroy {\r\n private unsubscribe: Subject<void> = new Subject<void>();\r\n private msalBroadcastService = inject(MsalBroadcastService);\r\n private msaLService = inject(MsalService);\r\n private ngZone = inject(NgZone);\r\n\r\n @Output() success = new EventEmitter<LoginOAuthResult>();\r\n\r\n showInfo = input<boolean>(true);\r\n applicationName = input<string>();\r\n autoInitialize = input<boolean>(false);\r\n allowMicrosoft = input<boolean>(true);\r\n allowGoogle = input<boolean>(true);\r\n\r\n\r\n protected oauthReady = signal<boolean>(false);\r\n protected oauthMicrosoftReady = signal<boolean>(false);\r\n protected oauthGoogleReady = signal<boolean>(false);\r\n\r\n\r\n ngOnInit() {\r\n if (this.autoInitialize()) {\r\n this.initialize();\r\n }\r\n this.msalBroadcastService.msalSubject$\r\n .pipe(\r\n filter((msg: EventMessage) => msg.eventType === EventType.ACQUIRE_TOKEN_SUCCESS),\r\n takeUntil(this.unsubscribe)\r\n )\r\n .subscribe((r: any) => { \r\n if (r) {\r\n this.success.emit({ type: 1, token: r.payload.accessToken });\r\n }\r\n });\r\n\r\n }\r\n\r\n ngOnDestroy() {\r\n this.unsubscribe.next();\r\n this.unsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Initialize open authentication \r\n * Must be a public method \r\n */\r\n initialize() {\r\n if (this.oauthReady()) {\r\n return; // Already done\r\n }\r\n this.oauthReady.set(true);\r\n\r\n // Load MS stack\r\n this.msaLService.initialize()\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe(() => {\r\n this.oauthMicrosoftReady.set(true);\r\n });\r\n\r\n // Load google maps script after view init\r\n const DSLScript = document.createElement('script');\r\n DSLScript.src = 'https://accounts.google.com/gsi/client';\r\n DSLScript.type = 'text/javascript';\r\n document.body.appendChild(DSLScript);\r\n document.body.removeChild(DSLScript);\r\n\r\n // @ts-ignore\r\n window.onGoogleLibraryLoad = () => {\r\n // initialize google account\r\n // @ts-ignore\r\n google.accounts.id.initialize({\r\n client_id: '71204983077-ag31h3bgt2udcbfr9nn84r9rni2k3snp.apps.googleusercontent.com',\r\n cancel_on_tap_outside: true,\r\n auto_select: false,\r\n callback: (r: any) => {\r\n this.ngZone.run(() => {\r\n this.success.emit({ type: 2, token: r.credential });\r\n });\r\n }\r\n });\r\n\r\n googleButtonWrapper = createFakeGoogleWrapper();\r\n\r\n this.oauthGoogleReady.set(true);\r\n };\r\n\r\n }\r\n\r\n /**\r\n * Perform login using MSAL\r\n */\r\n protected loginMSAL() {\r\n this.msaLService.loginPopup()\r\n .subscribe({\r\n next: (r: AuthenticationResult) => {\r\n this.msaLService.instance.setActiveAccount(r.account);\r\n this.msaLService.acquireTokenSilent({\r\n scopes: [\r\n \"api://6b2c080f-6ab0-4511-a9df-0bce69db5833/AngularSPAAuthScope\"\r\n ],\r\n account: r.account\r\n })\r\n }\r\n });\r\n }\r\n\r\n /**\r\n* Perform login using Google\r\n*/\r\n protected loginGoogle() {\r\n // Use wrapper click to prevent Illegal invocation exception\r\n googleButtonWrapper.click();\r\n }\r\n}\r\n\r\nconst createFakeGoogleWrapper = () => {\r\n const googleLoginWrapper = document.createElement(\"div\");\r\n // Or you can simple hide it in CSS rule for custom-google-button\r\n googleLoginWrapper.style.display = \"none\";\r\n googleLoginWrapper.classList.add(\"custom-google-button\");\r\n\r\n // Add the wrapper to body\r\n document.body.appendChild(googleLoginWrapper);\r\n\r\n // Use GSI javascript api to render the button inside our wrapper\r\n // You can ignore the properties because this button will not appear\r\n // @ts-ignore\r\n window.google.accounts.id.renderButton(googleLoginWrapper, {\r\n type: \"icon\",\r\n width: \"200\",\r\n });\r\n\r\n const googleLoginWrapperButton =\r\n googleLoginWrapper.querySelector(\"div[role=button]\");\r\n\r\n return {\r\n click: () => {\r\n // @ts-ignore\r\n googleLoginWrapperButton.click();\r\n },\r\n };\r\n};\r\nvar googleButtonWrapper: any = null;\r\n\r\n","<div class=\"login-oauth\">\r\n @if(showInfo()) {\r\n <div class=\"message\">\r\n <p>Questa sezione consente di accedere al servizio utilizzando un provider OAuth2.</p>\r\n @if(applicationName()) {\r\n <p>La email utilizzata deve essere collegata ad un utente valido di {{applicationName()}} e dei servizi ad esso\r\n connessi.</p>\r\n }\r\n </div>\r\n }\r\n @if (allowMicrosoft()) {\r\n <div class=\"button\">\r\n <button mat-flat-button color=\"primary\" (click)=\"loginMSAL()\" [attr.aria-label]=\"'Effettua accesso'\"\r\n [disabled]=\"!oauthMicrosoftReady()\" style=\"width: 100%;\">\r\n Accedi con Microsoft</button>\r\n </div>\r\n }\r\n @if (allowGoogle()) {\r\n <div class=\"button\">\r\n <button mat-flat-button color=\"primary\" (click)=\"loginGoogle()\" style=\"width: 100%;\"\r\n [attr.aria-label]=\"'Effettua accesso'\" [disabled]=\"!oauthGoogleReady()\">\r\n Accedi con Google</button>\r\n </div>\r\n }\r\n</div>","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './ui/ui.module';\r\nexport * from './ui/components/login/login-oauth.component';\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;IAAY,eAIX;AAJD,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;AACR,IAAA,cAAA,CAAA,cAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAa,CAAA;AACb,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU,CAAA;AACZ,CAAC,EAJW,cAAc,KAAd,cAAc,GAIzB,EAAA,CAAA,CAAA;;ACFD;MAGa,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAhB,gBAAgB,EAAA,CAAA,CAAA,EAAA;+GAAhB,gBAAgB,EAAA,CAAA,CAAA,EAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,QAAQ;;;ACIH,SAAU,mBAAmB,CAAC,WAA+B,EAAA;IACjE,OAAO,IAAI,uBAAuB,CAAC;AACjC,QAAA,IAAI,EAAE;AACJ,YAAA,QAAQ,EAAE,sCAAsC;AAChD,YAAA,SAAS,EAAE,0CAA0C;AACrD,YA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,EAAE;AACzD,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,KAAK,EAAE,KAAK;AACb,KAAA,CAAC,CAAC;IAEH,MAAM,wBAAwB,GAC5B,kBAAkB,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAEvD,OAAO;QACL,KAAK,EAAE,MAAK;;YAEV,wBAAwB,CAAC,KAAK,EAAE,CAAC;SAClC;KACF,CAAC;AACJ,CAAC,CAAC;AACF,IAAI,mBAAmB,GAAQ,IAAI;;AEjNnC;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arsedizioni/ars-utils",
|
|
3
|
-
"version": "18.4.
|
|
3
|
+
"version": "18.4.5",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "software@arsedizioni.it",
|
|
6
6
|
"name": "Fabio Buscaroli, Alberto Doria"
|
|
@@ -46,12 +46,6 @@
|
|
|
46
46
|
"esm": "./esm2022/clipper.ui/arsedizioni-ars-utils-clipper.ui.mjs",
|
|
47
47
|
"default": "./fesm2022/arsedizioni-ars-utils-clipper.ui.mjs"
|
|
48
48
|
},
|
|
49
|
-
"./help": {
|
|
50
|
-
"types": "./help/index.d.ts",
|
|
51
|
-
"esm2022": "./esm2022/help/arsedizioni-ars-utils-help.mjs",
|
|
52
|
-
"esm": "./esm2022/help/arsedizioni-ars-utils-help.mjs",
|
|
53
|
-
"default": "./fesm2022/arsedizioni-ars-utils-help.mjs"
|
|
54
|
-
},
|
|
55
49
|
"./evolution.common": {
|
|
56
50
|
"types": "./evolution.common/index.d.ts",
|
|
57
51
|
"esm2022": "./esm2022/evolution.common/arsedizioni-ars-utils-evolution.common.mjs",
|
|
@@ -64,6 +58,12 @@
|
|
|
64
58
|
"esm": "./esm2022/core/arsedizioni-ars-utils-core.mjs",
|
|
65
59
|
"default": "./fesm2022/arsedizioni-ars-utils-core.mjs"
|
|
66
60
|
},
|
|
61
|
+
"./help": {
|
|
62
|
+
"types": "./help/index.d.ts",
|
|
63
|
+
"esm2022": "./esm2022/help/arsedizioni-ars-utils-help.mjs",
|
|
64
|
+
"esm": "./esm2022/help/arsedizioni-ars-utils-help.mjs",
|
|
65
|
+
"default": "./fesm2022/arsedizioni-ars-utils-help.mjs"
|
|
66
|
+
},
|
|
67
67
|
"./support.common": {
|
|
68
68
|
"types": "./support.common/index.d.ts",
|
|
69
69
|
"esm2022": "./esm2022/support.common/arsedizioni-ars-utils-support.common.mjs",
|
|
@@ -13,8 +13,11 @@ export declare class LoginOAuthComponent implements OnInit, OnDestroy {
|
|
|
13
13
|
private msaLService;
|
|
14
14
|
private ngZone;
|
|
15
15
|
success: EventEmitter<LoginOAuthResult>;
|
|
16
|
-
|
|
16
|
+
showInfo: import("@angular/core").InputSignal<boolean>;
|
|
17
|
+
applicationName: import("@angular/core").InputSignal<string>;
|
|
17
18
|
autoInitialize: import("@angular/core").InputSignal<boolean>;
|
|
19
|
+
allowMicrosoft: import("@angular/core").InputSignal<boolean>;
|
|
20
|
+
allowGoogle: import("@angular/core").InputSignal<boolean>;
|
|
18
21
|
protected oauthReady: import("@angular/core").WritableSignal<boolean>;
|
|
19
22
|
protected oauthMicrosoftReady: import("@angular/core").WritableSignal<boolean>;
|
|
20
23
|
protected oauthGoogleReady: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -34,5 +37,5 @@ export declare class LoginOAuthComponent implements OnInit, OnDestroy {
|
|
|
34
37
|
*/
|
|
35
38
|
protected loginGoogle(): void;
|
|
36
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoginOAuthComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LoginOAuthComponent, "login-oauth", never, { "
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginOAuthComponent, "login-oauth", never, { "showInfo": { "alias": "showInfo"; "required": false; "isSignal": true; }; "applicationName": { "alias": "applicationName"; "required": false; "isSignal": true; }; "autoInitialize": { "alias": "autoInitialize"; "required": false; "isSignal": true; }; "allowMicrosoft": { "alias": "allowMicrosoft"; "required": false; "isSignal": true; }; "allowGoogle": { "alias": "allowGoogle"; "required": false; "isSignal": true; }; }, { "success": "success"; }, never, never, true, never>;
|
|
38
41
|
}
|