@acorex-platform/extension-microsoft-client 0.0.21

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.
@@ -0,0 +1,20 @@
1
+ //#region ---- Module Config ----
2
+ const config = {
3
+ i18n: 'extensions-microsoft',
4
+ module: 'microsoft-extension',
5
+ };
6
+ const RootConfig = {
7
+ config,
8
+ module: {
9
+ name: config.module,
10
+ icon: 'fa-brands fa-microsoft',
11
+ },
12
+ };
13
+ //#endregion
14
+
15
+ /**
16
+ * Generated bundle index. Do not edit.
17
+ */
18
+
19
+ export { RootConfig };
20
+ //# sourceMappingURL=acorex-platform-extension-microsoft-client-contracts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-extension-microsoft-client-contracts.mjs","sources":["../../../../libs/extensions/microsoft/contracts/src/root-config.ts","../../../../libs/extensions/microsoft/contracts/src/acorex-platform-extension-microsoft-client-contracts.ts"],"sourcesContent":["//#region ---- Module Config ----\n\nconst config = {\n i18n: 'extensions-microsoft',\n module: 'microsoft-extension',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: config.module,\n icon: 'fa-brands fa-microsoft',\n },\n};\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AAEA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,sBAAsB;AAC5B,IAAA,MAAM,EAAE,qBAAqB;CAC9B;AAEM,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC,MAAM;AACnB,QAAA,IAAI,EAAE,wBAAwB;AAC/B,KAAA;;AAGH;;ACfA;;AAEG;;;;"}
@@ -0,0 +1,54 @@
1
+ import * as i1 from '@acorex/components/button';
2
+ import { AXButtonModule } from '@acorex/components/button';
3
+ import * as i2 from '@acorex/components/decorators';
4
+ import { AXDecoratorModule } from '@acorex/components/decorators';
5
+ import * as i3 from '@acorex/components/loading';
6
+ import { AXLoadingModule } from '@acorex/components/loading';
7
+ import * as i5 from '@acorex/core/translation';
8
+ import { AXTranslationModule } from '@acorex/core/translation';
9
+ import { AXToastService } from '@acorex/components/toast';
10
+ import { AXPSessionService } from '@acorex-platform/framework-client/auth';
11
+ import { AXPLogoComponent } from '@acorex-platform/framework-client/core';
12
+ import * as i4 from '@angular/common';
13
+ import { CommonModule } from '@angular/common';
14
+ import * as i0 from '@angular/core';
15
+ import { inject, signal, ChangeDetectionStrategy, Component } from '@angular/core';
16
+ import { axpMicrosoftLogoKey } from './acorex-platform-extension-microsoft-client.mjs';
17
+
18
+ //#region ---- Microsoft platform login slot ----
19
+ class AXEMicrosoftPlatformLoginSlotComponent {
20
+ constructor() {
21
+ this.logoKey = axpMicrosoftLogoKey;
22
+ this.sessionService = inject(AXPSessionService);
23
+ this.toastService = inject(AXToastService);
24
+ this.isLoading = signal(false, /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
26
+ }
27
+ async handleMicrosoftSignIn() {
28
+ this.isLoading.set(true);
29
+ try {
30
+ this.sessionService.setStrategy('microsoft');
31
+ await this.sessionService.signin({ strategy: 'microsoft' });
32
+ }
33
+ catch (error) {
34
+ const message = error instanceof Error ? error.message : 'Microsoft sign-in failed.';
35
+ this.toastService.show({
36
+ color: 'danger',
37
+ content: message,
38
+ timeOut: 6000,
39
+ });
40
+ }
41
+ finally {
42
+ this.isLoading.set(false);
43
+ }
44
+ }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftPlatformLoginSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
46
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXEMicrosoftPlatformLoginSlotComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<ax-button\n class=\"w-full mt-2\"\n text=\"{{ '@auth:authentication.with-microsoft' | translate | async }}\"\n [color]=\"'default'\"\n id=\"microsoft-platform-login\"\n (onClick)=\"handleMicrosoftSignIn()\"\n [disabled]=\"isLoading()\"\n>\n <ax-prefix>\n <axp-logo [logoKey]=\"logoKey\" appearance=\"colored\" [size]=\"20\" />\n </ax-prefix>\n @if (isLoading()) {\n <ax-loading></ax-loading>\n }\n</ax-button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i3.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPLogoComponent, selector: "axp-logo", inputs: ["logoKey", "appearance", "size", "format"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
47
+ }
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftPlatformLoginSlotComponent, decorators: [{
49
+ type: Component,
50
+ args: [{ changeDetection: ChangeDetectionStrategy.Eager, imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXLoadingModule, AXTranslationModule, AXPLogoComponent], template: "<ax-button\n class=\"w-full mt-2\"\n text=\"{{ '@auth:authentication.with-microsoft' | translate | async }}\"\n [color]=\"'default'\"\n id=\"microsoft-platform-login\"\n (onClick)=\"handleMicrosoftSignIn()\"\n [disabled]=\"isLoading()\"\n>\n <ax-prefix>\n <axp-logo [logoKey]=\"logoKey\" appearance=\"colored\" [size]=\"20\" />\n </ax-prefix>\n @if (isLoading()) {\n <ax-loading></ax-loading>\n }\n</ax-button>\n" }]
51
+ }] });
52
+
53
+ export { AXEMicrosoftPlatformLoginSlotComponent };
54
+ //# sourceMappingURL=acorex-platform-extension-microsoft-client-microsoft-platform-login-slot.component-CPNPmuXR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-extension-microsoft-client-microsoft-platform-login-slot.component-CPNPmuXR.mjs","sources":["../../../../libs/extensions/microsoft/client/src/lib/platform-auth/microsoft-platform-login-slot.component.ts","../../../../libs/extensions/microsoft/client/src/lib/platform-auth/microsoft-platform-login-slot.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport { CommonModule } from '@angular/common';\nimport { Component, inject, signal, ChangeDetectionStrategy } from '@angular/core';\nimport { axpMicrosoftLogoKey } from '../brand/microsoft-logo-key';\n\n//#region ---- Microsoft platform login slot ----\n\n@Component({\n templateUrl: './microsoft-platform-login-slot.component.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXLoadingModule, AXTranslationModule, AXPLogoComponent],\n})\nexport class AXEMicrosoftPlatformLoginSlotComponent {\n protected readonly logoKey = axpMicrosoftLogoKey;\n\n private readonly sessionService = inject(AXPSessionService);\n private readonly toastService = inject(AXToastService);\n protected isLoading = signal(false);\n\n protected async handleMicrosoftSignIn(): Promise<void> {\n this.isLoading.set(true);\n try {\n this.sessionService.setStrategy('microsoft');\n await this.sessionService.signin({ strategy: 'microsoft' });\n } catch (error) {\n const message = error instanceof Error ? error.message : 'Microsoft sign-in failed.';\n this.toastService.show({\n color: 'danger',\n content: message,\n timeOut: 6000,\n });\n } finally {\n this.isLoading.set(false);\n }\n }\n}\n\n//#endregion\n","<ax-button\n class=\"w-full mt-2\"\n text=\"{{ '@auth:authentication.with-microsoft' | translate | async }}\"\n [color]=\"'default'\"\n id=\"microsoft-platform-login\"\n (onClick)=\"handleMicrosoftSignIn()\"\n [disabled]=\"isLoading()\"\n>\n <ax-prefix>\n <axp-logo [logoKey]=\"logoKey\" appearance=\"colored\" [size]=\"20\" />\n </ax-prefix>\n @if (isLoading()) {\n <ax-loading></ax-loading>\n }\n</ax-button>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAWA;MAOa,sCAAsC,CAAA;AALnD,IAAA,WAAA,GAAA;QAMqB,IAAA,CAAA,OAAO,GAAG,mBAAmB;AAE/B,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,KAAK;sFAAC;AAkBpC,IAAA;AAhBW,IAAA,MAAM,qBAAqB,GAAA;AACnC,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;AACxB,QAAA,IAAI;AACF,YAAA,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,WAAW,CAAC;AAC5C,YAAA,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;QAC7D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,2BAA2B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,EAAA,CAAA,2BAAA,EAAA,QAAA,EAAA,8IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,mBAAmB,+BAAE,gBAAgB,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAEtG,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBALlD,SAAS;AAES,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,uBAAuB,CAAC,KAAK,EAAA,OAAA,EACrC,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,8aAAA,EAAA;;;;;"}
@@ -0,0 +1,335 @@
1
+ import * as i3 from '@acorex-platform/framework-client/auth';
2
+ import { AXPAuthStrategy, AXPSessionService, AXPPlatformAuthRuntimeService, resolvePlatformOAuthIssuer, resolvePlatformOAuthClientConfig, PkceUtil, toPlatformOAuthSignInResult, shouldPlatformOAuthBindSession, platformOAuthSessionUpdateParams, resolvePlatformOAuthTokenEndpoint, JwtUtil, TimeUtil, resolvePlatformOAuthAuthorizeEndpoint, AXPAuthModule } from '@acorex-platform/framework-client/auth';
3
+ import * as i1 from '@acorex-platform/framework-client/core';
4
+ import { AXP_LOGO_PROVIDER } from '@acorex-platform/framework-client/core';
5
+ import { AXM_AUTH_CONFIG_TOKEN, AUTH_LOGIN_EXTERNAL_PROVIDERS_SLOT } from '@acorex-platform/module-auth-client';
6
+ import * as i0 from '@angular/core';
7
+ import { inject, Injectable, NgModule, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
8
+
9
+ //#region ---- Microsoft platform auth strategy ----
10
+ class AXEMicrosoftPlatformAuthStrategy extends AXPAuthStrategy {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.authConfigs = inject(AXM_AUTH_CONFIG_TOKEN);
14
+ this.sessionService = inject(AXPSessionService);
15
+ this.platformAuthRuntime = inject(AXPPlatformAuthRuntimeService);
16
+ }
17
+ get name() {
18
+ return 'microsoft';
19
+ }
20
+ resolveIssuer() {
21
+ return resolvePlatformOAuthIssuer(this.authConfigs.baseUrl);
22
+ }
23
+ resolveClientConfig() {
24
+ return resolvePlatformOAuthClientConfig(this.authConfigs.authConfig);
25
+ }
26
+ async signin(_credentials) {
27
+ await this.redirectToMicrosoftPlatformAuthorize();
28
+ }
29
+ async redirectToMicrosoftPlatformAuthorize() {
30
+ const issuer = this.resolveIssuer();
31
+ const { clientId, redirectUri, scope } = this.resolveClientConfig();
32
+ const codeVerifier = PkceUtil.generateRandomString(128);
33
+ localStorage.setItem('pkce_code_verifier', codeVerifier);
34
+ const codeChallenge = await PkceUtil.generateCodeChallenge(codeVerifier);
35
+ this.sessionService.setStrategy('microsoft');
36
+ const params = new URLSearchParams({
37
+ response_type: 'code',
38
+ client_id: clientId,
39
+ redirect_uri: redirectUri,
40
+ scope,
41
+ code_challenge: codeChallenge,
42
+ code_challenge_method: 'S256',
43
+ prompt: 'login',
44
+ acr_values: 'microsoft',
45
+ });
46
+ window.location.assign(`${issuer}/connect/authorize?${params.toString()}`);
47
+ await this.waitForOAuthRedirect();
48
+ }
49
+ async signout() {
50
+ localStorage.removeItem('pkce_code_verifier');
51
+ localStorage.removeItem('oauth_provider');
52
+ await this.platformAuthRuntime.logout();
53
+ }
54
+ async refreshToken(_context) {
55
+ try {
56
+ const authData = this.loadAuthData();
57
+ const tokenData = await this.platformAuthRuntime.refresh();
58
+ return toPlatformOAuthSignInResult(tokenData, {
59
+ user: tokenData.user,
60
+ tenant: authData?.tenant ?? null,
61
+ application: authData?.application ?? null,
62
+ });
63
+ }
64
+ catch (error) {
65
+ console.error('Error refreshing token', error);
66
+ return { succeed: false };
67
+ }
68
+ }
69
+ async updateToken(params) {
70
+ try {
71
+ if (params['code']) {
72
+ return this.exchangeAuthorizationCode(params);
73
+ }
74
+ if (shouldPlatformOAuthBindSession(this.sessionService.hasSessionCredentials(), params)) {
75
+ const { tenant, application, tenantId, applicationId } = platformOAuthSessionUpdateParams(params);
76
+ const result = await this.platformAuthRuntime.updateSession({
77
+ tenantId,
78
+ applicationId,
79
+ tenant,
80
+ application,
81
+ });
82
+ return toPlatformOAuthSignInResult(result, {
83
+ user: params['user'] ?? null,
84
+ tenant: tenant ?? null,
85
+ application: application ?? null,
86
+ });
87
+ }
88
+ return this.beginAuthorizationCodeFlow(params);
89
+ }
90
+ catch (error) {
91
+ console.error('Error in updateToken:', error);
92
+ throw error;
93
+ }
94
+ }
95
+ async exchangeAuthorizationCode(params) {
96
+ const code = params['code'];
97
+ const issuer = this.resolveIssuer();
98
+ const { clientId, redirectUri } = this.resolveClientConfig();
99
+ const resolvedRedirectUri = params['redirectUri'] || redirectUri;
100
+ const resolvedClientId = params['clientId'] || clientId;
101
+ const tokenEndpoint = resolvePlatformOAuthTokenEndpoint(issuer);
102
+ const codeVerifier = localStorage.getItem('pkce_code_verifier');
103
+ if (!codeVerifier) {
104
+ throw new Error('Code verifier not found. Please try signing in again.');
105
+ }
106
+ const body = new URLSearchParams({
107
+ grant_type: 'authorization_code',
108
+ client_id: resolvedClientId,
109
+ code_verifier: codeVerifier,
110
+ code,
111
+ redirect_uri: resolvedRedirectUri,
112
+ });
113
+ const response = await fetch(tokenEndpoint, {
114
+ method: 'POST',
115
+ credentials: 'include',
116
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
117
+ body: body.toString(),
118
+ });
119
+ if (!response.ok) {
120
+ const detail = await response.text().catch(() => '');
121
+ throw new Error(`Token exchange failed: ${response.status} ${response.statusText}${detail ? ` — ${detail}` : ''}`);
122
+ }
123
+ localStorage.removeItem('pkce_code_verifier');
124
+ const tokenData = await response.json();
125
+ const payload = JwtUtil.parseJwt(tokenData.id_token);
126
+ if (!payload) {
127
+ throw new Error('Payload not found');
128
+ }
129
+ const user = {
130
+ id: payload['sub'] || '',
131
+ title: payload['name'] || payload['email'] || '',
132
+ name: payload['name'] || payload['email'] || '',
133
+ avatar: payload['picture'] || '',
134
+ };
135
+ return {
136
+ succeed: true,
137
+ data: {
138
+ accessToken: tokenData.access_token ?? tokenData.accessToken,
139
+ refreshToken: tokenData.refresh_token ?? tokenData.refreshToken,
140
+ idToken: tokenData.id_token ?? null,
141
+ expiresIn: TimeUtil.calculateExpireInDate(tokenData.expires_in || 0),
142
+ user,
143
+ tenant: null,
144
+ application: null,
145
+ },
146
+ };
147
+ }
148
+ async beginAuthorizationCodeFlow(params) {
149
+ const issuer = this.resolveIssuer();
150
+ const tenantId = params['tenantId'] ?? params['tenant']?.id ?? null;
151
+ const applicationId = params['applicationId'] ?? params['application']?.id ?? null;
152
+ const { clientId, redirectUri, scope } = this.resolveClientConfig();
153
+ const resolvedRedirectUri = params['redirectUri'] || redirectUri;
154
+ const resolvedScope = params['scope'] || scope;
155
+ const codeVerifier = PkceUtil.generateRandomString(128);
156
+ localStorage.setItem('pkce_code_verifier', codeVerifier);
157
+ const codeChallenge = await PkceUtil.generateCodeChallenge(codeVerifier);
158
+ const authorizeEndpoint = resolvePlatformOAuthAuthorizeEndpoint(issuer);
159
+ const state = Math.random().toString(36).substring(2);
160
+ const queryParams = [
161
+ `response_type=code`,
162
+ `client_id=${encodeURIComponent(clientId)}`,
163
+ `redirect_uri=${encodeURIComponent(resolvedRedirectUri)}`,
164
+ `scope=${encodeURIComponent(resolvedScope)}`,
165
+ `state=${encodeURIComponent(state)}`,
166
+ tenantId ? `tenant_id=${encodeURIComponent(tenantId)}` : null,
167
+ applicationId ? `application_id=${encodeURIComponent(applicationId)}` : null,
168
+ `code_challenge=${encodeURIComponent(codeChallenge)}`,
169
+ `code_challenge_method=S256`,
170
+ `acr_values=microsoft`,
171
+ ]
172
+ .filter(Boolean)
173
+ .join('&');
174
+ window.location.href = `${authorizeEndpoint}?${queryParams}`;
175
+ await this.waitForOAuthRedirect();
176
+ return undefined;
177
+ }
178
+ waitForOAuthRedirect() {
179
+ return new Promise(() => { });
180
+ }
181
+ loadAuthData() {
182
+ return this.sessionService.getSessionData() || undefined;
183
+ }
184
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftPlatformAuthStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
185
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftPlatformAuthStrategy }); }
186
+ }
187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftPlatformAuthStrategy, decorators: [{
188
+ type: Injectable
189
+ }] });
190
+
191
+ //#region ---- Microsoft platform login availability ----
192
+ class AXEMicrosoftPlatformLoginAvailabilityService {
193
+ constructor() {
194
+ this.platformAuthRuntime = inject(AXPPlatformAuthRuntimeService);
195
+ this.cachedEnabled = null;
196
+ }
197
+ async isEnabled() {
198
+ if (this.cachedEnabled !== null) {
199
+ return this.cachedEnabled;
200
+ }
201
+ try {
202
+ const providers = await this.platformAuthRuntime.listProviders();
203
+ this.cachedEnabled = providers.identityProviders.some((p) => p.id === 'microsoft');
204
+ return this.cachedEnabled;
205
+ }
206
+ catch {
207
+ this.cachedEnabled = false;
208
+ return false;
209
+ }
210
+ }
211
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftPlatformLoginAvailabilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
212
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftPlatformLoginAvailabilityService }); }
213
+ }
214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftPlatformLoginAvailabilityService, decorators: [{
215
+ type: Injectable
216
+ }] });
217
+
218
+ //#region ---- Microsoft logo registry key ----
219
+ const axpMicrosoftLogoKey = 'microsoft';
220
+ //#endregion
221
+
222
+ const microsoftLogoProvider = {
223
+ key: axpMicrosoftLogoKey,
224
+ resolve: async (request) => ({
225
+ kind: 'component',
226
+ load: () => Promise.resolve().then(function () { return microsoftLogo_component; }).then((module) => module.AXEMicrosoftLogoComponent),
227
+ inputs: {
228
+ appearance: request.appearance,
229
+ size: request.size,
230
+ },
231
+ }),
232
+ };
233
+ const AXE_MICROSOFT_LOGO_PROVIDER = {
234
+ provide: AXP_LOGO_PROVIDER,
235
+ useValue: microsoftLogoProvider,
236
+ multi: true,
237
+ };
238
+
239
+ //#region ---- Imports ----
240
+ //#endregion
241
+ //#region ---- Module ----
242
+ /**
243
+ * Microsoft platform login via OAuth.
244
+ * Future: Outlook, OneDrive, Teams integrations can register here.
245
+ */
246
+ class AXEMicrosoftExtensionModule {
247
+ constructor(registry, microsoftPlatformLogin) {
248
+ registry.register(AUTH_LOGIN_EXTERNAL_PROVIDERS_SLOT, {
249
+ name: 'microsoft-platform-login',
250
+ priority: 15,
251
+ loadComponent: () => import('./acorex-platform-extension-microsoft-client-microsoft-platform-login-slot.component-CPNPmuXR.mjs').then((component) => component.AXEMicrosoftPlatformLoginSlotComponent),
252
+ condition: () => microsoftPlatformLogin.isEnabled(),
253
+ });
254
+ }
255
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftExtensionModule, deps: [{ token: i1.AXPComponentSlotRegistryService }, { token: AXEMicrosoftPlatformLoginAvailabilityService }], target: i0.ɵɵFactoryTarget.NgModule }); }
256
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftExtensionModule, imports: [i3.AXPAuthModule] }); }
257
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftExtensionModule, providers: [AXEMicrosoftPlatformLoginAvailabilityService, AXE_MICROSOFT_LOGO_PROVIDER], imports: [AXPAuthModule.forChild({ strategies: [AXEMicrosoftPlatformAuthStrategy] })] }); }
258
+ }
259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftExtensionModule, decorators: [{
260
+ type: NgModule,
261
+ args: [{
262
+ imports: [AXPAuthModule.forChild({ strategies: [AXEMicrosoftPlatformAuthStrategy] })],
263
+ providers: [AXEMicrosoftPlatformLoginAvailabilityService, AXE_MICROSOFT_LOGO_PROVIDER],
264
+ }]
265
+ }], ctorParameters: () => [{ type: i1.AXPComponentSlotRegistryService }, { type: AXEMicrosoftPlatformLoginAvailabilityService }] });
266
+
267
+ //#region ---- Microsoft brand logo (owned by Microsoft extension) ----
268
+ class AXEMicrosoftLogoComponent {
269
+ constructor() {
270
+ this.appearance = input('colored', /* @ts-ignore */
271
+ ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
272
+ this.size = input(20, /* @ts-ignore */
273
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
274
+ this.resolvedAppearance = computed(() => {
275
+ const value = this.appearance();
276
+ return value === 'monochrome' ? 'monochrome' : 'colored';
277
+ }, /* @ts-ignore */
278
+ ...(ngDevMode ? [{ debugName: "resolvedAppearance" }] : /* istanbul ignore next */ []));
279
+ }
280
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
281
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXEMicrosoftLogoComponent, isStandalone: true, selector: "axe-microsoft-logo", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "inline-flex items-center justify-center" }, ngImport: i0, template: `
282
+ @switch (resolvedAppearance()) {
283
+ @case ('monochrome') {
284
+ <svg [attr.width]="size()" [attr.height]="size()" viewBox="0 0 23 23" aria-hidden="true">
285
+ <path fill="currentColor" d="M1 1h10v10H1zm11 0h10v10H12zM1 12h10v10H1zm11 0h10v10H12z" />
286
+ </svg>
287
+ }
288
+ @default {
289
+ <svg [attr.width]="size()" [attr.height]="size()" viewBox="0 0 23 23" aria-hidden="true">
290
+ <path fill="#F35325" d="M1 1h10v10H1z" />
291
+ <path fill="#81BC06" d="M12 1h10v10H12z" />
292
+ <path fill="#05A6F0" d="M1 12h10v10H1z" />
293
+ <path fill="#FFBA08" d="M12 12h10v10H12z" />
294
+ </svg>
295
+ }
296
+ }
297
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.Eager }); }
298
+ }
299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEMicrosoftLogoComponent, decorators: [{
300
+ type: Component,
301
+ args: [{
302
+ selector: 'axe-microsoft-logo',
303
+ host: { class: 'inline-flex items-center justify-center' },
304
+ changeDetection: ChangeDetectionStrategy.Eager,
305
+ template: `
306
+ @switch (resolvedAppearance()) {
307
+ @case ('monochrome') {
308
+ <svg [attr.width]="size()" [attr.height]="size()" viewBox="0 0 23 23" aria-hidden="true">
309
+ <path fill="currentColor" d="M1 1h10v10H1zm11 0h10v10H12zM1 12h10v10H1zm11 0h10v10H12z" />
310
+ </svg>
311
+ }
312
+ @default {
313
+ <svg [attr.width]="size()" [attr.height]="size()" viewBox="0 0 23 23" aria-hidden="true">
314
+ <path fill="#F35325" d="M1 1h10v10H1z" />
315
+ <path fill="#81BC06" d="M12 1h10v10H12z" />
316
+ <path fill="#05A6F0" d="M1 12h10v10H1z" />
317
+ <path fill="#FFBA08" d="M12 12h10v10H12z" />
318
+ </svg>
319
+ }
320
+ }
321
+ `,
322
+ }]
323
+ }], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
324
+
325
+ var microsoftLogo_component = /*#__PURE__*/Object.freeze({
326
+ __proto__: null,
327
+ AXEMicrosoftLogoComponent: AXEMicrosoftLogoComponent
328
+ });
329
+
330
+ /**
331
+ * Generated bundle index. Do not edit.
332
+ */
333
+
334
+ export { AXEMicrosoftExtensionModule, AXEMicrosoftLogoComponent, AXEMicrosoftPlatformAuthStrategy, AXE_MICROSOFT_LOGO_PROVIDER, axpMicrosoftLogoKey };
335
+ //# sourceMappingURL=acorex-platform-extension-microsoft-client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-extension-microsoft-client.mjs","sources":["../../../../libs/extensions/microsoft/client/src/lib/platform-auth/microsoft-platform-auth.strategy.ts","../../../../libs/extensions/microsoft/client/src/lib/platform-auth/microsoft-platform-login-availability.service.ts","../../../../libs/extensions/microsoft/client/src/lib/brand/microsoft-logo-key.ts","../../../../libs/extensions/microsoft/client/src/lib/brand/microsoft-logo.provider.ts","../../../../libs/extensions/microsoft/client/src/lib/microsoft-extension.module.ts","../../../../libs/extensions/microsoft/client/src/lib/brand/microsoft-logo.component.ts","../../../../libs/extensions/microsoft/client/src/acorex-platform-extension-microsoft-client.ts"],"sourcesContent":["import { AXM_AUTH_CONFIG_TOKEN, AXMAuthConfigs } from '@acorex-platform/module-auth-client';\nimport {\n AXPAuthStrategy,\n AXPBaseCredentials,\n AXPPlatformAuthRuntimeService,\n AXPSessionContext,\n AXPSessionData,\n AXPSessionService,\n AXPSignInResult,\n AXPUser,\n JwtUtil,\n PkceUtil,\n platformOAuthSessionUpdateParams,\n resolvePlatformOAuthAuthorizeEndpoint,\n resolvePlatformOAuthClientConfig,\n resolvePlatformOAuthIssuer,\n resolvePlatformOAuthTokenEndpoint,\n shouldPlatformOAuthBindSession,\n TimeUtil,\n toPlatformOAuthSignInResult,\n} from '@acorex-platform/framework-client/auth';\nimport { inject, Injectable } from '@angular/core';\n\n//#region ---- Microsoft platform auth strategy ----\n\n@Injectable()\nexport class AXEMicrosoftPlatformAuthStrategy extends AXPAuthStrategy {\n private readonly authConfigs: AXMAuthConfigs = inject(AXM_AUTH_CONFIG_TOKEN);\n private readonly sessionService = inject(AXPSessionService);\n private readonly platformAuthRuntime = inject(AXPPlatformAuthRuntimeService);\n\n get name(): string {\n return 'microsoft';\n }\n\n private resolveIssuer(): string {\n return resolvePlatformOAuthIssuer(this.authConfigs.baseUrl);\n }\n\n private resolveClientConfig() {\n return resolvePlatformOAuthClientConfig(this.authConfigs.authConfig);\n }\n\n override async signin(_credentials: AXPBaseCredentials): Promise<void> {\n await this.redirectToMicrosoftPlatformAuthorize();\n }\n\n private async redirectToMicrosoftPlatformAuthorize(): Promise<void> {\n const issuer = this.resolveIssuer();\n const { clientId, redirectUri, scope } = this.resolveClientConfig();\n\n const codeVerifier = PkceUtil.generateRandomString(128);\n localStorage.setItem('pkce_code_verifier', codeVerifier);\n const codeChallenge = await PkceUtil.generateCodeChallenge(codeVerifier);\n\n this.sessionService.setStrategy('microsoft');\n\n const params = new URLSearchParams({\n response_type: 'code',\n client_id: clientId,\n redirect_uri: redirectUri,\n scope,\n code_challenge: codeChallenge,\n code_challenge_method: 'S256',\n prompt: 'login',\n acr_values: 'microsoft',\n });\n\n window.location.assign(`${issuer}/connect/authorize?${params.toString()}`);\n await this.waitForOAuthRedirect();\n }\n\n async signout(): Promise<void> {\n localStorage.removeItem('pkce_code_verifier');\n localStorage.removeItem('oauth_provider');\n await this.platformAuthRuntime.logout();\n }\n\n async refreshToken(_context: AXPSessionContext): Promise<AXPSignInResult> {\n try {\n const authData = this.loadAuthData();\n const tokenData = await this.platformAuthRuntime.refresh();\n return toPlatformOAuthSignInResult(tokenData, {\n user: tokenData.user,\n tenant: authData?.tenant ?? null,\n application: authData?.application ?? null,\n });\n } catch (error) {\n console.error('Error refreshing token', error);\n return { succeed: false };\n }\n }\n\n override async updateToken(params: { [key: string]: any }): Promise<AXPSignInResult | undefined> {\n try {\n if (params['code']) {\n return this.exchangeAuthorizationCode(params);\n }\n\n if (shouldPlatformOAuthBindSession(this.sessionService.hasSessionCredentials(), params)) {\n const { tenant, application, tenantId, applicationId } = platformOAuthSessionUpdateParams(params);\n const result = await this.platformAuthRuntime.updateSession({\n tenantId,\n applicationId,\n tenant,\n application,\n });\n return toPlatformOAuthSignInResult(result, {\n user: (params['user'] as AXPUser) ?? null,\n tenant: tenant ?? null,\n application: application ?? null,\n });\n }\n\n return this.beginAuthorizationCodeFlow(params);\n } catch (error) {\n console.error('Error in updateToken:', error);\n throw error;\n }\n }\n\n private async exchangeAuthorizationCode(params: { [key: string]: any }): Promise<AXPSignInResult> {\n const code = params['code'];\n const issuer = this.resolveIssuer();\n const { clientId, redirectUri } = this.resolveClientConfig();\n const resolvedRedirectUri = params['redirectUri'] || redirectUri;\n const resolvedClientId = params['clientId'] || clientId;\n const tokenEndpoint = resolvePlatformOAuthTokenEndpoint(issuer);\n\n const codeVerifier = localStorage.getItem('pkce_code_verifier');\n if (!codeVerifier) {\n throw new Error('Code verifier not found. Please try signing in again.');\n }\n\n const body = new URLSearchParams({\n grant_type: 'authorization_code',\n client_id: resolvedClientId,\n code_verifier: codeVerifier,\n code,\n redirect_uri: resolvedRedirectUri,\n });\n\n const response = await fetch(tokenEndpoint, {\n method: 'POST',\n credentials: 'include',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n body: body.toString(),\n });\n\n if (!response.ok) {\n const detail = await response.text().catch(() => '');\n throw new Error(\n `Token exchange failed: ${response.status} ${response.statusText}${detail ? ` — ${detail}` : ''}`,\n );\n }\n\n localStorage.removeItem('pkce_code_verifier');\n\n const tokenData = await response.json();\n const payload = JwtUtil.parseJwt(tokenData.id_token);\n if (!payload) {\n throw new Error('Payload not found');\n }\n\n const user = {\n id: payload['sub'] || '',\n title: payload['name'] || payload['email'] || '',\n name: payload['name'] || payload['email'] || '',\n avatar: payload['picture'] || '',\n } as AXPUser;\n\n return {\n succeed: true,\n data: {\n accessToken: tokenData.access_token ?? tokenData.accessToken,\n refreshToken: tokenData.refresh_token ?? tokenData.refreshToken,\n idToken: tokenData.id_token ?? null,\n expiresIn: TimeUtil.calculateExpireInDate(tokenData.expires_in || 0),\n user,\n tenant: null,\n application: null,\n },\n };\n }\n\n private async beginAuthorizationCodeFlow(params: { [key: string]: any }): Promise<undefined> {\n const issuer = this.resolveIssuer();\n const tenantId = params['tenantId'] ?? params['tenant']?.id ?? null;\n const applicationId = params['applicationId'] ?? params['application']?.id ?? null;\n const { clientId, redirectUri, scope } = this.resolveClientConfig();\n const resolvedRedirectUri = params['redirectUri'] || redirectUri;\n const resolvedScope = params['scope'] || scope;\n\n const codeVerifier = PkceUtil.generateRandomString(128);\n localStorage.setItem('pkce_code_verifier', codeVerifier);\n const codeChallenge = await PkceUtil.generateCodeChallenge(codeVerifier);\n\n const authorizeEndpoint = resolvePlatformOAuthAuthorizeEndpoint(issuer);\n const state = Math.random().toString(36).substring(2);\n\n const queryParams = [\n `response_type=code`,\n `client_id=${encodeURIComponent(clientId)}`,\n `redirect_uri=${encodeURIComponent(resolvedRedirectUri)}`,\n `scope=${encodeURIComponent(resolvedScope)}`,\n `state=${encodeURIComponent(state)}`,\n tenantId ? `tenant_id=${encodeURIComponent(tenantId)}` : null,\n applicationId ? `application_id=${encodeURIComponent(applicationId)}` : null,\n `code_challenge=${encodeURIComponent(codeChallenge)}`,\n `code_challenge_method=S256`,\n `acr_values=microsoft`,\n ]\n .filter(Boolean)\n .join('&');\n\n window.location.href = `${authorizeEndpoint}?${queryParams}`;\n await this.waitForOAuthRedirect();\n\n return undefined;\n }\n\n private waitForOAuthRedirect(): Promise<void> {\n return new Promise<void>(() => {});\n }\n\n private loadAuthData(): AXPSessionData | undefined {\n return this.sessionService.getSessionData() || undefined;\n }\n}\n\n//#endregion\n","import { AXPPlatformAuthRuntimeService } from '@acorex-platform/framework-client/auth';\nimport { Injectable, inject } from '@angular/core';\n\n//#region ---- Microsoft platform login availability ----\n\n@Injectable()\nexport class AXEMicrosoftPlatformLoginAvailabilityService {\n private readonly platformAuthRuntime = inject(AXPPlatformAuthRuntimeService);\n private cachedEnabled: boolean | null = null;\n\n async isEnabled(): Promise<boolean> {\n if (this.cachedEnabled !== null) {\n return this.cachedEnabled;\n }\n\n try {\n const providers = await this.platformAuthRuntime.listProviders();\n this.cachedEnabled = providers.identityProviders.some((p) => p.id === 'microsoft');\n return this.cachedEnabled;\n } catch {\n this.cachedEnabled = false;\n return false;\n }\n }\n}\n\n//#endregion\n","//#region ---- Microsoft logo registry key ----\n\nexport const axpMicrosoftLogoKey = 'microsoft' as const;\n\n//#endregion\n","import {\n AXP_LOGO_PROVIDER,\n type AXPLogoProvider,\n type AXPLogoRequest,\n type AXPLogoView,\n} from '@acorex-platform/framework-client/core';\nimport { axpMicrosoftLogoKey } from './microsoft-logo-key';\n\nconst microsoftLogoProvider: AXPLogoProvider = {\n key: axpMicrosoftLogoKey,\n resolve: async (request: AXPLogoRequest): Promise<AXPLogoView> => ({\n kind: 'component',\n load: () =>\n import('./microsoft-logo.component').then((module) => module.AXEMicrosoftLogoComponent),\n inputs: {\n appearance: request.appearance,\n size: request.size,\n },\n }),\n};\n\nexport const AXE_MICROSOFT_LOGO_PROVIDER = {\n provide: AXP_LOGO_PROVIDER,\n useValue: microsoftLogoProvider,\n multi: true,\n} as const;\n","//#region ---- Imports ----\n\nimport { AXPAuthModule } from '@acorex-platform/framework-client/auth';\nimport { AXPComponentSlotRegistryService } from '@acorex-platform/framework-client/core';\nimport { AUTH_LOGIN_EXTERNAL_PROVIDERS_SLOT } from '@acorex-platform/module-auth-client';\nimport { NgModule } from '@angular/core';\nimport { AXEMicrosoftPlatformAuthStrategy } from './platform-auth/microsoft-platform-auth.strategy';\nimport { AXEMicrosoftPlatformLoginAvailabilityService } from './platform-auth/microsoft-platform-login-availability.service';\nimport { AXE_MICROSOFT_LOGO_PROVIDER } from './brand/microsoft-logo.provider';\n\n//#endregion\n\n//#region ---- Module ----\n\n/**\n * Microsoft platform login via OAuth.\n * Future: Outlook, OneDrive, Teams integrations can register here.\n */\n@NgModule({\n imports: [AXPAuthModule.forChild({ strategies: [AXEMicrosoftPlatformAuthStrategy] })],\n providers: [AXEMicrosoftPlatformLoginAvailabilityService, AXE_MICROSOFT_LOGO_PROVIDER],\n})\nexport class AXEMicrosoftExtensionModule {\n constructor(\n registry: AXPComponentSlotRegistryService,\n microsoftPlatformLogin: AXEMicrosoftPlatformLoginAvailabilityService,\n ) {\n registry.register(AUTH_LOGIN_EXTERNAL_PROVIDERS_SLOT, {\n name: 'microsoft-platform-login',\n priority: 15,\n loadComponent: () =>\n import('./platform-auth/microsoft-platform-login-slot.component').then(\n (component) => component.AXEMicrosoftPlatformLoginSlotComponent,\n ),\n condition: () => microsoftPlatformLogin.isEnabled(),\n });\n }\n}\n\n//#endregion\n","import type { AXPLogoAppearance } from '@acorex-platform/framework-client/core';\nimport { Component, computed, input, ChangeDetectionStrategy } from '@angular/core';\n\n//#region ---- Microsoft brand logo (owned by Microsoft extension) ----\n\n@Component({\n selector: 'axe-microsoft-logo',\n host: { class: 'inline-flex items-center justify-center' },\n changeDetection: ChangeDetectionStrategy.Eager,\n template: `\n @switch (resolvedAppearance()) {\n @case ('monochrome') {\n <svg [attr.width]=\"size()\" [attr.height]=\"size()\" viewBox=\"0 0 23 23\" aria-hidden=\"true\">\n <path fill=\"currentColor\" d=\"M1 1h10v10H1zm11 0h10v10H12zM1 12h10v10H1zm11 0h10v10H12z\" />\n </svg>\n }\n @default {\n <svg [attr.width]=\"size()\" [attr.height]=\"size()\" viewBox=\"0 0 23 23\" aria-hidden=\"true\">\n <path fill=\"#F35325\" d=\"M1 1h10v10H1z\" />\n <path fill=\"#81BC06\" d=\"M12 1h10v10H12z\" />\n <path fill=\"#05A6F0\" d=\"M1 12h10v10H1z\" />\n <path fill=\"#FFBA08\" d=\"M12 12h10v10H12z\" />\n </svg>\n }\n }\n `,\n})\nexport class AXEMicrosoftLogoComponent {\n appearance = input<AXPLogoAppearance>('colored');\n size = input(20);\n\n protected readonly resolvedAppearance = computed(() => {\n const value = this.appearance();\n return value === 'monochrome' ? 'monochrome' : 'colored';\n });\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.AXEMicrosoftPlatformLoginAvailabilityService"],"mappings":";;;;;;;;AAuBA;AAGM,MAAO,gCAAiC,SAAQ,eAAe,CAAA;AADrE,IAAA,WAAA,GAAA;;AAEmB,QAAA,IAAA,CAAA,WAAW,GAAmB,MAAM,CAAC,qBAAqB,CAAC;AAC3D,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAuM7E,IAAA;AArMC,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,WAAW;IACpB;IAEQ,aAAa,GAAA;QACnB,OAAO,0BAA0B,CAAC,IAAI,CAAC,WAAW,CAAC,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,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAEU,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAtBrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,yCAAyC,EAAE;oBAC1D,eAAe,EAAE,uBAAuB,CAAC,KAAK;AAC9C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;AAgBT,EAAA,CAAA;AACF,iBAAA;;;;;;;;AC1BD;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@acorex-platform/extension-microsoft-client",
3
+ "version": "0.0.21",
4
+ "sideEffects": false,
5
+ "peerDependencies": {
6
+ "@angular/common": "^21.0.0",
7
+ "@angular/core": "^21.0.0"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "module": "fesm2022/acorex-platform-extension-microsoft-client.mjs",
13
+ "typings": "types/acorex-platform-extension-microsoft-client.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/acorex-platform-extension-microsoft-client.d.ts",
20
+ "default": "./fesm2022/acorex-platform-extension-microsoft-client.mjs"
21
+ },
22
+ "./contracts": {
23
+ "types": "./types/acorex-platform-extension-microsoft-client-contracts.d.ts",
24
+ "default": "./fesm2022/acorex-platform-extension-microsoft-client-contracts.mjs"
25
+ }
26
+ },
27
+ "type": "module"
28
+ }
@@ -0,0 +1,12 @@
1
+ declare const RootConfig: {
2
+ config: {
3
+ i18n: string;
4
+ module: string;
5
+ };
6
+ module: {
7
+ name: string;
8
+ icon: string;
9
+ };
10
+ };
11
+
12
+ export { RootConfig };
@@ -0,0 +1,63 @@
1
+ import { AXPComponentSlotRegistryService, AXPLogoAppearance, AXPLogoProvider } from '@acorex-platform/framework-client/core';
2
+ import * as i0 from '@angular/core';
3
+ import * as i1 from '@acorex-platform/framework-client/auth';
4
+ import { AXPAuthStrategy, AXPBaseCredentials, AXPSessionContext, AXPSignInResult } from '@acorex-platform/framework-client/auth';
5
+
6
+ declare class AXEMicrosoftPlatformLoginAvailabilityService {
7
+ private readonly platformAuthRuntime;
8
+ private cachedEnabled;
9
+ isEnabled(): Promise<boolean>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXEMicrosoftPlatformLoginAvailabilityService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXEMicrosoftPlatformLoginAvailabilityService>;
12
+ }
13
+
14
+ /**
15
+ * Microsoft platform login via OAuth.
16
+ * Future: Outlook, OneDrive, Teams integrations can register here.
17
+ */
18
+ declare class AXEMicrosoftExtensionModule {
19
+ constructor(registry: AXPComponentSlotRegistryService, microsoftPlatformLogin: AXEMicrosoftPlatformLoginAvailabilityService);
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXEMicrosoftExtensionModule, never>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXEMicrosoftExtensionModule, never, [typeof i1.AXPAuthModule], never>;
22
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXEMicrosoftExtensionModule>;
23
+ }
24
+
25
+ declare class AXEMicrosoftPlatformAuthStrategy extends AXPAuthStrategy {
26
+ private readonly authConfigs;
27
+ private readonly sessionService;
28
+ private readonly platformAuthRuntime;
29
+ get name(): string;
30
+ private resolveIssuer;
31
+ private resolveClientConfig;
32
+ signin(_credentials: AXPBaseCredentials): Promise<void>;
33
+ private redirectToMicrosoftPlatformAuthorize;
34
+ signout(): Promise<void>;
35
+ refreshToken(_context: AXPSessionContext): Promise<AXPSignInResult>;
36
+ updateToken(params: {
37
+ [key: string]: any;
38
+ }): Promise<AXPSignInResult | undefined>;
39
+ private exchangeAuthorizationCode;
40
+ private beginAuthorizationCodeFlow;
41
+ private waitForOAuthRedirect;
42
+ private loadAuthData;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXEMicrosoftPlatformAuthStrategy, never>;
44
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXEMicrosoftPlatformAuthStrategy>;
45
+ }
46
+
47
+ declare class AXEMicrosoftLogoComponent {
48
+ appearance: i0.InputSignal<AXPLogoAppearance>;
49
+ size: i0.InputSignal<number>;
50
+ protected readonly resolvedAppearance: i0.Signal<"colored" | "monochrome">;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXEMicrosoftLogoComponent, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXEMicrosoftLogoComponent, "axe-microsoft-logo", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
53
+ }
54
+
55
+ declare const axpMicrosoftLogoKey: "microsoft";
56
+
57
+ declare const AXE_MICROSOFT_LOGO_PROVIDER: {
58
+ readonly provide: i0.InjectionToken<AXPLogoProvider[]>;
59
+ readonly useValue: AXPLogoProvider;
60
+ readonly multi: true;
61
+ };
62
+
63
+ export { AXEMicrosoftExtensionModule, AXEMicrosoftLogoComponent, AXEMicrosoftPlatformAuthStrategy, AXE_MICROSOFT_LOGO_PROVIDER, axpMicrosoftLogoKey };