@emilgroup/auth-sdk 1.13.1-beta.0 → 1.14.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/README.md +2 -2
- package/api/authservice-api.ts +0 -58
- package/base.ts +3 -3
- package/dist/api/authservice-api.d.ts +0 -25
- package/dist/api/authservice-api.js +0 -65
- package/dist/base.d.ts +2 -2
- package/dist/base.js +1 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/auth-sdk@1.
|
|
20
|
+
npm install @emilgroup/auth-sdk@1.14.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/auth-sdk@1.
|
|
24
|
+
yarn add @emilgroup/auth-sdk@1.14.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import ``.
|
package/api/authservice-api.ts
CHANGED
|
@@ -164,37 +164,6 @@ export const AuthserviceApiAxiosParamCreator = function (configuration?: Configu
|
|
|
164
164
|
options: localVarRequestOptions,
|
|
165
165
|
};
|
|
166
166
|
},
|
|
167
|
-
/**
|
|
168
|
-
*
|
|
169
|
-
* @param {*} [options] Override http request option.
|
|
170
|
-
* @throws {RequiredError}
|
|
171
|
-
*/
|
|
172
|
-
generateReadmeToken: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
173
|
-
const localVarPath = `/authservice/v1/readme-token`;
|
|
174
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
175
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
176
|
-
let baseOptions;
|
|
177
|
-
let baseAccessToken;
|
|
178
|
-
if (configuration) {
|
|
179
|
-
baseOptions = configuration.baseOptions;
|
|
180
|
-
baseAccessToken = configuration.accessToken;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
184
|
-
const localVarHeaderParameter = {} as any;
|
|
185
|
-
const localVarQueryParameter = {} as any;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
190
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
191
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
192
|
-
|
|
193
|
-
return {
|
|
194
|
-
url: toPathString(localVarUrlObj),
|
|
195
|
-
options: localVarRequestOptions,
|
|
196
|
-
};
|
|
197
|
-
},
|
|
198
167
|
/**
|
|
199
168
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
200
169
|
* @summary Get SAML login link for tenant
|
|
@@ -589,15 +558,6 @@ export const AuthserviceApiFp = function(configuration?: Configuration) {
|
|
|
589
558
|
const localVarAxiosArgs = await localVarAxiosParamCreator.forgotPassword(forgotPasswordRequestDto, options);
|
|
590
559
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
591
560
|
},
|
|
592
|
-
/**
|
|
593
|
-
*
|
|
594
|
-
* @param {*} [options] Override http request option.
|
|
595
|
-
* @throws {RequiredError}
|
|
596
|
-
*/
|
|
597
|
-
async generateReadmeToken(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
598
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.generateReadmeToken(options);
|
|
599
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
600
|
-
},
|
|
601
561
|
/**
|
|
602
562
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
603
563
|
* @summary Get SAML login link for tenant
|
|
@@ -738,14 +698,6 @@ export const AuthserviceApiFactory = function (configuration?: Configuration, ba
|
|
|
738
698
|
forgotPassword(forgotPasswordRequestDto: ForgotPasswordRequestDto, options?: any): AxiosPromise<void> {
|
|
739
699
|
return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then((request) => request(axios, basePath));
|
|
740
700
|
},
|
|
741
|
-
/**
|
|
742
|
-
*
|
|
743
|
-
* @param {*} [options] Override http request option.
|
|
744
|
-
* @throws {RequiredError}
|
|
745
|
-
*/
|
|
746
|
-
generateReadmeToken(options?: any): AxiosPromise<void> {
|
|
747
|
-
return localVarFp.generateReadmeToken(options).then((request) => request(axios, basePath));
|
|
748
|
-
},
|
|
749
701
|
/**
|
|
750
702
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
751
703
|
* @summary Get SAML login link for tenant
|
|
@@ -1058,16 +1010,6 @@ export class AuthserviceApi extends BaseAPI {
|
|
|
1058
1010
|
return AuthserviceApiFp(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
1059
1011
|
}
|
|
1060
1012
|
|
|
1061
|
-
/**
|
|
1062
|
-
*
|
|
1063
|
-
* @param {*} [options] Override http request option.
|
|
1064
|
-
* @throws {RequiredError}
|
|
1065
|
-
* @memberof AuthserviceApi
|
|
1066
|
-
*/
|
|
1067
|
-
public generateReadmeToken(options?: AxiosRequestConfig) {
|
|
1068
|
-
return AuthserviceApiFp(this.configuration).generateReadmeToken(options).then((request) => request(this.axios, this.basePath));
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
1013
|
/**
|
|
1072
1014
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
1073
1015
|
* @summary Get SAML login link for tenant
|
package/base.ts
CHANGED
|
@@ -34,7 +34,7 @@ export const COLLECTION_FORMATS = {
|
|
|
34
34
|
|
|
35
35
|
export interface LoginClass {
|
|
36
36
|
accessToken: string;
|
|
37
|
-
permissions:
|
|
37
|
+
permissions: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export enum Environment {
|
|
@@ -77,7 +77,7 @@ const TOKEN_DATA = 'APP_TOKEN';
|
|
|
77
77
|
export class BaseAPI {
|
|
78
78
|
protected configuration: Configuration | undefined;
|
|
79
79
|
private tokenData?: TokenData;
|
|
80
|
-
private permissions
|
|
80
|
+
private permissions?: string;
|
|
81
81
|
|
|
82
82
|
constructor(configuration?: Configuration,
|
|
83
83
|
protected basePath: string = BASE_PATH,
|
|
@@ -111,7 +111,7 @@ export class BaseAPI {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
getPermissions(): Array<string> {
|
|
114
|
-
return this.permissions;
|
|
114
|
+
return this.permissions.split(',');
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
async authorize(username: string, password: string): Promise<void> {
|
|
@@ -53,12 +53,6 @@ export declare const AuthserviceApiAxiosParamCreator: (configuration?: Configura
|
|
|
53
53
|
* @throws {RequiredError}
|
|
54
54
|
*/
|
|
55
55
|
forgotPassword: (forgotPasswordRequestDto: ForgotPasswordRequestDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
* @param {*} [options] Override http request option.
|
|
59
|
-
* @throws {RequiredError}
|
|
60
|
-
*/
|
|
61
|
-
generateReadmeToken: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
62
56
|
/**
|
|
63
57
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
64
58
|
* @summary Get SAML login link for tenant
|
|
@@ -162,12 +156,6 @@ export declare const AuthserviceApiFp: (configuration?: Configuration) => {
|
|
|
162
156
|
* @throws {RequiredError}
|
|
163
157
|
*/
|
|
164
158
|
forgotPassword(forgotPasswordRequestDto: ForgotPasswordRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
165
|
-
/**
|
|
166
|
-
*
|
|
167
|
-
* @param {*} [options] Override http request option.
|
|
168
|
-
* @throws {RequiredError}
|
|
169
|
-
*/
|
|
170
|
-
generateReadmeToken(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
171
159
|
/**
|
|
172
160
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
173
161
|
* @summary Get SAML login link for tenant
|
|
@@ -271,12 +259,6 @@ export declare const AuthserviceApiFactory: (configuration?: Configuration, base
|
|
|
271
259
|
* @throws {RequiredError}
|
|
272
260
|
*/
|
|
273
261
|
forgotPassword(forgotPasswordRequestDto: ForgotPasswordRequestDto, options?: any): AxiosPromise<void>;
|
|
274
|
-
/**
|
|
275
|
-
*
|
|
276
|
-
* @param {*} [options] Override http request option.
|
|
277
|
-
* @throws {RequiredError}
|
|
278
|
-
*/
|
|
279
|
-
generateReadmeToken(options?: any): AxiosPromise<void>;
|
|
280
262
|
/**
|
|
281
263
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
282
264
|
* @summary Get SAML login link for tenant
|
|
@@ -547,13 +529,6 @@ export declare class AuthserviceApi extends BaseAPI {
|
|
|
547
529
|
* @memberof AuthserviceApi
|
|
548
530
|
*/
|
|
549
531
|
forgotPassword(requestParameters: AuthserviceApiForgotPasswordRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
|
|
550
|
-
/**
|
|
551
|
-
*
|
|
552
|
-
* @param {*} [options] Override http request option.
|
|
553
|
-
* @throws {RequiredError}
|
|
554
|
-
* @memberof AuthserviceApi
|
|
555
|
-
*/
|
|
556
|
-
generateReadmeToken(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
|
|
557
532
|
/**
|
|
558
533
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
559
534
|
* @summary Get SAML login link for tenant
|
|
@@ -197,35 +197,6 @@ var AuthserviceApiAxiosParamCreator = function (configuration) {
|
|
|
197
197
|
});
|
|
198
198
|
});
|
|
199
199
|
},
|
|
200
|
-
/**
|
|
201
|
-
*
|
|
202
|
-
* @param {*} [options] Override http request option.
|
|
203
|
-
* @throws {RequiredError}
|
|
204
|
-
*/
|
|
205
|
-
generateReadmeToken: function (options) {
|
|
206
|
-
if (options === void 0) { options = {}; }
|
|
207
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
208
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
209
|
-
return __generator(this, function (_a) {
|
|
210
|
-
localVarPath = "/authservice/v1/readme-token";
|
|
211
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
212
|
-
if (configuration) {
|
|
213
|
-
baseOptions = configuration.baseOptions;
|
|
214
|
-
baseAccessToken = configuration.accessToken;
|
|
215
|
-
}
|
|
216
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
217
|
-
localVarHeaderParameter = {};
|
|
218
|
-
localVarQueryParameter = {};
|
|
219
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
220
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
221
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
222
|
-
return [2 /*return*/, {
|
|
223
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
224
|
-
options: localVarRequestOptions,
|
|
225
|
-
}];
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
},
|
|
229
200
|
/**
|
|
230
201
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
231
202
|
* @summary Get SAML login link for tenant
|
|
@@ -619,24 +590,6 @@ var AuthserviceApiFp = function (configuration) {
|
|
|
619
590
|
});
|
|
620
591
|
});
|
|
621
592
|
},
|
|
622
|
-
/**
|
|
623
|
-
*
|
|
624
|
-
* @param {*} [options] Override http request option.
|
|
625
|
-
* @throws {RequiredError}
|
|
626
|
-
*/
|
|
627
|
-
generateReadmeToken: function (options) {
|
|
628
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
629
|
-
var localVarAxiosArgs;
|
|
630
|
-
return __generator(this, function (_a) {
|
|
631
|
-
switch (_a.label) {
|
|
632
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.generateReadmeToken(options)];
|
|
633
|
-
case 1:
|
|
634
|
-
localVarAxiosArgs = _a.sent();
|
|
635
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
});
|
|
639
|
-
},
|
|
640
593
|
/**
|
|
641
594
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
642
595
|
* @summary Get SAML login link for tenant
|
|
@@ -858,14 +811,6 @@ var AuthserviceApiFactory = function (configuration, basePath, axios) {
|
|
|
858
811
|
forgotPassword: function (forgotPasswordRequestDto, options) {
|
|
859
812
|
return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
860
813
|
},
|
|
861
|
-
/**
|
|
862
|
-
*
|
|
863
|
-
* @param {*} [options] Override http request option.
|
|
864
|
-
* @throws {RequiredError}
|
|
865
|
-
*/
|
|
866
|
-
generateReadmeToken: function (options) {
|
|
867
|
-
return localVarFp.generateReadmeToken(options).then(function (request) { return request(axios, basePath); });
|
|
868
|
-
},
|
|
869
814
|
/**
|
|
870
815
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
871
816
|
* @summary Get SAML login link for tenant
|
|
@@ -1007,16 +952,6 @@ var AuthserviceApi = /** @class */ (function (_super) {
|
|
|
1007
952
|
var _this = this;
|
|
1008
953
|
return (0, exports.AuthserviceApiFp)(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1009
954
|
};
|
|
1010
|
-
/**
|
|
1011
|
-
*
|
|
1012
|
-
* @param {*} [options] Override http request option.
|
|
1013
|
-
* @throws {RequiredError}
|
|
1014
|
-
* @memberof AuthserviceApi
|
|
1015
|
-
*/
|
|
1016
|
-
AuthserviceApi.prototype.generateReadmeToken = function (options) {
|
|
1017
|
-
var _this = this;
|
|
1018
|
-
return (0, exports.AuthserviceApiFp)(this.configuration).generateReadmeToken(options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1019
|
-
};
|
|
1020
955
|
/**
|
|
1021
956
|
* Get SAML login link configured for the tenant in cognito as well as tenant settings
|
|
1022
957
|
* @summary Get SAML login link for tenant
|
package/dist/base.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const COLLECTION_FORMATS: {
|
|
|
24
24
|
};
|
|
25
25
|
export interface LoginClass {
|
|
26
26
|
accessToken: string;
|
|
27
|
-
permissions:
|
|
27
|
+
permissions: string;
|
|
28
28
|
}
|
|
29
29
|
export declare enum Environment {
|
|
30
30
|
Production = "https://apiv2.emil.de",
|
|
@@ -52,7 +52,7 @@ export declare class BaseAPI {
|
|
|
52
52
|
protected axios: AxiosInstance;
|
|
53
53
|
protected configuration: Configuration | undefined;
|
|
54
54
|
private tokenData?;
|
|
55
|
-
private permissions
|
|
55
|
+
private permissions?;
|
|
56
56
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
57
57
|
selectEnvironment(env: Environment): void;
|
|
58
58
|
selectBasePath(path: string): void;
|
package/dist/base.js
CHANGED
|
@@ -121,7 +121,6 @@ var BaseAPI = /** @class */ (function () {
|
|
|
121
121
|
if (axios === void 0) { axios = axios_1.default; }
|
|
122
122
|
this.basePath = basePath;
|
|
123
123
|
this.axios = axios;
|
|
124
|
-
this.permissions = [];
|
|
125
124
|
this.loadTokenData();
|
|
126
125
|
if (configuration) {
|
|
127
126
|
this.configuration = configuration;
|
|
@@ -145,7 +144,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
145
144
|
this.configuration.basePath = path;
|
|
146
145
|
};
|
|
147
146
|
BaseAPI.prototype.getPermissions = function () {
|
|
148
|
-
return this.permissions;
|
|
147
|
+
return this.permissions.split(',');
|
|
149
148
|
};
|
|
150
149
|
BaseAPI.prototype.authorize = function (username, password) {
|
|
151
150
|
return __awaiter(this, void 0, void 0, function () {
|