@axinom/mosaic-id-utils 0.17.0-rc.9 → 0.18.0-rc.0
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/dist/common/enums.d.ts +0 -10
- package/dist/common/enums.d.ts.map +1 -1
- package/dist/common/enums.js +1 -12
- package/dist/common/enums.js.map +1 -1
- package/dist/common/types.d.ts +22 -2
- package/dist/common/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/common/enums.ts +0 -11
- package/src/common/types.ts +30 -2
package/dist/common/enums.d.ts
CHANGED
|
@@ -4,16 +4,6 @@ export declare enum IdentityProvider {
|
|
|
4
4
|
GOOGLE = "GOOGLE",
|
|
5
5
|
AXINOM = "AXINOM"
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* The id-service API will be using the `IdentityProviderCompatibility` for sending responses to maintain backward compatibility.
|
|
9
|
-
* This should be kept in-sync with the `IdentityProvider` ENUM.
|
|
10
|
-
*/
|
|
11
|
-
export declare enum IdentityProviderCompatibility {
|
|
12
|
-
AX_AUTH = 0,
|
|
13
|
-
AZURE_AD = 1,
|
|
14
|
-
GOOGLE = 2,
|
|
15
|
-
AXINOM = 3
|
|
16
|
-
}
|
|
17
7
|
export declare enum TokenResponseCode {
|
|
18
8
|
SUCCESS = 0,
|
|
19
9
|
NEEDS_LOGIN = 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/common/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/common/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,iBAAiB;IAC3B,OAAO,IAAA;IACP,WAAW,IAAA;IACX,kBAAkB,IAAA;IAClB,KAAK,IAAA;CACN;AAED,oBAAY,kBAAkB;IAC5B,OAAO,IAAA;IACP,KAAK,IAAA;CACN;AAED,oBAAY,wBAAwB;IAClC,OAAO,YAAY;IACnB,iBAAiB,sBAAsB;IACvC,sBAAsB,2BAA2B;IACjD,oBAAoB,yBAAyB;IAC7C,KAAK,UAAU;CAChB"}
|
package/dist/common/enums.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfigStatusResponseCode = exports.LogoutResponseCode = exports.TokenResponseCode = exports.
|
|
3
|
+
exports.ConfigStatusResponseCode = exports.LogoutResponseCode = exports.TokenResponseCode = exports.IdentityProvider = void 0;
|
|
4
4
|
var IdentityProvider;
|
|
5
5
|
(function (IdentityProvider) {
|
|
6
6
|
IdentityProvider["AX_AUTH"] = "AX_AUTH";
|
|
@@ -8,17 +8,6 @@ var IdentityProvider;
|
|
|
8
8
|
IdentityProvider["GOOGLE"] = "GOOGLE";
|
|
9
9
|
IdentityProvider["AXINOM"] = "AXINOM";
|
|
10
10
|
})(IdentityProvider = exports.IdentityProvider || (exports.IdentityProvider = {}));
|
|
11
|
-
/**
|
|
12
|
-
* The id-service API will be using the `IdentityProviderCompatibility` for sending responses to maintain backward compatibility.
|
|
13
|
-
* This should be kept in-sync with the `IdentityProvider` ENUM.
|
|
14
|
-
*/
|
|
15
|
-
var IdentityProviderCompatibility;
|
|
16
|
-
(function (IdentityProviderCompatibility) {
|
|
17
|
-
IdentityProviderCompatibility[IdentityProviderCompatibility["AX_AUTH"] = 0] = "AX_AUTH";
|
|
18
|
-
IdentityProviderCompatibility[IdentityProviderCompatibility["AZURE_AD"] = 1] = "AZURE_AD";
|
|
19
|
-
IdentityProviderCompatibility[IdentityProviderCompatibility["GOOGLE"] = 2] = "GOOGLE";
|
|
20
|
-
IdentityProviderCompatibility[IdentityProviderCompatibility["AXINOM"] = 3] = "AXINOM";
|
|
21
|
-
})(IdentityProviderCompatibility = exports.IdentityProviderCompatibility || (exports.IdentityProviderCompatibility = {}));
|
|
22
11
|
var TokenResponseCode;
|
|
23
12
|
(function (TokenResponseCode) {
|
|
24
13
|
TokenResponseCode[TokenResponseCode["SUCCESS"] = 0] = "SUCCESS";
|
package/dist/common/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/common/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;AACnB,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAED
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/common/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;AACnB,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAED,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,+DAAO,CAAA;IACP,uEAAW,CAAA;IACX,qFAAkB,CAAA;IAClB,2DAAK,CAAA;AACP,CAAC,EALW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAK5B;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,iEAAO,CAAA;IACP,6DAAK,CAAA;AACP,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAED,IAAY,wBAMX;AAND,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,mEAAuC,CAAA;IACvC,6EAAiD,CAAA;IACjD,yEAA6C,CAAA;IAC7C,2CAAe,CAAA;AACjB,CAAC,EANW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAMnC"}
|
package/dist/common/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { User } from '@axinom/mosaic-core';
|
|
2
|
-
import { ConfigStatusResponseCode, IdentityProvider,
|
|
2
|
+
import { ConfigStatusResponseCode, IdentityProvider, LogoutResponseCode, TokenResponseCode } from './enums';
|
|
3
3
|
export interface IdentityProviderInfo {
|
|
4
4
|
idpId: IdentityProvider;
|
|
5
5
|
title: string;
|
|
@@ -14,11 +14,30 @@ export interface LogoutResponse {
|
|
|
14
14
|
code: LogoutResponseCode;
|
|
15
15
|
message?: string;
|
|
16
16
|
}
|
|
17
|
+
interface IdpConfigBase {
|
|
18
|
+
idProvider: IdentityProvider;
|
|
19
|
+
idProviderId: string;
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface AxAuthIdpConfig extends IdpConfigBase {
|
|
23
|
+
idProvider: IdentityProvider.AX_AUTH;
|
|
24
|
+
clientId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface GoogleIdpConfig extends IdpConfigBase {
|
|
27
|
+
idProvider: IdentityProvider.GOOGLE;
|
|
28
|
+
}
|
|
29
|
+
export interface AzureIdpConfig extends IdpConfigBase {
|
|
30
|
+
idProvider: IdentityProvider.AZURE_AD;
|
|
31
|
+
}
|
|
32
|
+
export interface AxinomIdpConfig extends IdpConfigBase {
|
|
33
|
+
idProvider: IdentityProvider.AXINOM;
|
|
34
|
+
}
|
|
17
35
|
export interface ConfigStatusResponse {
|
|
18
36
|
code: ConfigStatusResponseCode;
|
|
19
37
|
tenantId: string;
|
|
20
38
|
environmentId: string;
|
|
21
|
-
enabledIdentityProviders:
|
|
39
|
+
enabledIdentityProviders: (AxAuthIdpConfig | GoogleIdpConfig | AzureIdpConfig | AxinomIdpConfig)[];
|
|
40
|
+
isDirectSignInEnabled?: boolean;
|
|
22
41
|
}
|
|
23
42
|
export interface IdentityServiceConfig {
|
|
24
43
|
idServiceAuthBaseUrl: string;
|
|
@@ -31,4 +50,5 @@ export interface TokenResult {
|
|
|
31
50
|
tokenType: string;
|
|
32
51
|
}
|
|
33
52
|
export type ManagedServiceId = 'ax-id-service' | 'ax-micro-frontend-service' | 'ax-portal-service' | 'ax-auth-service' | 'ax-image-service' | 'ax-video-service' | 'ax-user-service' | 'ax-personalization-service' | 'ax-subscription-monetization-service' | 'ax-monetization-grants-service' | 'ax-hosting-service' | 'ax-billing-service' | 'ax-localization-service';
|
|
53
|
+
export {};
|
|
34
54
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAGjB,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAGD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAGD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;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ANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-id-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0-rc.0",
|
|
4
4
|
"description": "Shared types used by id-service for integration clients",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"lint": "eslint . --ext .ts,.tsx,.js --color --cache"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@axinom/mosaic-core": "^0.4.
|
|
28
|
+
"@axinom/mosaic-core": "^0.4.25-rc.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"jest": "^29",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "40b2eedf8826a60afe1edd6e37dd6e12c0c3254a"
|
|
39
39
|
}
|
package/src/common/enums.ts
CHANGED
|
@@ -5,17 +5,6 @@ export enum IdentityProvider {
|
|
|
5
5
|
AXINOM = 'AXINOM',
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* The id-service API will be using the `IdentityProviderCompatibility` for sending responses to maintain backward compatibility.
|
|
10
|
-
* This should be kept in-sync with the `IdentityProvider` ENUM.
|
|
11
|
-
*/
|
|
12
|
-
export enum IdentityProviderCompatibility {
|
|
13
|
-
AX_AUTH,
|
|
14
|
-
AZURE_AD,
|
|
15
|
-
GOOGLE,
|
|
16
|
-
AXINOM,
|
|
17
|
-
}
|
|
18
|
-
|
|
19
8
|
export enum TokenResponseCode {
|
|
20
9
|
SUCCESS,
|
|
21
10
|
NEEDS_LOGIN,
|
package/src/common/types.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { User } from '@axinom/mosaic-core';
|
|
|
2
2
|
import {
|
|
3
3
|
ConfigStatusResponseCode,
|
|
4
4
|
IdentityProvider,
|
|
5
|
-
IdentityProviderCompatibility,
|
|
6
5
|
LogoutResponseCode,
|
|
7
6
|
TokenResponseCode,
|
|
8
7
|
} from './enums';
|
|
@@ -27,12 +26,41 @@ export interface LogoutResponse {
|
|
|
27
26
|
message?: string;
|
|
28
27
|
}
|
|
29
28
|
|
|
29
|
+
interface IdpConfigBase {
|
|
30
|
+
idProvider: IdentityProvider;
|
|
31
|
+
idProviderId: string;
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface AxAuthIdpConfig extends IdpConfigBase {
|
|
36
|
+
idProvider: IdentityProvider.AX_AUTH;
|
|
37
|
+
clientId: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface GoogleIdpConfig extends IdpConfigBase {
|
|
41
|
+
idProvider: IdentityProvider.GOOGLE;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface AzureIdpConfig extends IdpConfigBase {
|
|
45
|
+
idProvider: IdentityProvider.AZURE_AD;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface AxinomIdpConfig extends IdpConfigBase {
|
|
49
|
+
idProvider: IdentityProvider.AXINOM;
|
|
50
|
+
}
|
|
51
|
+
|
|
30
52
|
// Used by id-link to get tenant & environment status with idp configurations
|
|
31
53
|
export interface ConfigStatusResponse {
|
|
32
54
|
code: ConfigStatusResponseCode;
|
|
33
55
|
tenantId: string;
|
|
34
56
|
environmentId: string;
|
|
35
|
-
enabledIdentityProviders:
|
|
57
|
+
enabledIdentityProviders: (
|
|
58
|
+
| AxAuthIdpConfig
|
|
59
|
+
| GoogleIdpConfig
|
|
60
|
+
| AzureIdpConfig
|
|
61
|
+
| AxinomIdpConfig
|
|
62
|
+
)[];
|
|
63
|
+
isDirectSignInEnabled?: boolean;
|
|
36
64
|
}
|
|
37
65
|
|
|
38
66
|
// Used by Host Application to set id-service configuration
|