@emilgroup/auth-sdk-node 1.0.0-beta.1 → 1.0.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 +1 -1
- package/api.ts +1 -1
- package/base.ts +4 -4
- package/common.ts +2 -2
- package/configuration.ts +1 -1
- package/dist/api/authservice-api.d.ts +1 -1
- package/dist/api/authservice-api.js +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/base.d.ts +2 -2
- package/dist/base.js +4 -4
- package/dist/common.d.ts +2 -2
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/models/create-org-and-user-request-dto.d.ts +1 -1
- package/dist/models/create-org-and-user-request-dto.js +1 -1
- package/dist/models/create-org-and-user-response-class.d.ts +1 -1
- package/dist/models/create-org-and-user-response-class.js +1 -1
- package/dist/models/create-user-request-dto.d.ts +1 -1
- package/dist/models/create-user-request-dto.js +1 -1
- package/dist/models/create-user-response-class.d.ts +1 -1
- package/dist/models/create-user-response-class.js +1 -1
- package/dist/models/forgot-password-request-dto.d.ts +1 -1
- package/dist/models/forgot-password-request-dto.js +1 -1
- package/dist/models/get-samllogin-link-request-dto.d.ts +1 -1
- package/dist/models/get-samllogin-link-request-dto.js +1 -1
- package/dist/models/login-by-samlrequest-dto.d.ts +1 -1
- package/dist/models/login-by-samlrequest-dto.js +1 -1
- package/dist/models/login-class.d.ts +1 -1
- package/dist/models/login-class.js +1 -1
- package/dist/models/login-request-dto.d.ts +1 -1
- package/dist/models/login-request-dto.js +1 -1
- package/dist/models/logout-request-dto.d.ts +1 -1
- package/dist/models/logout-request-dto.js +1 -1
- package/dist/models/organization-class.d.ts +10 -4
- package/dist/models/organization-class.js +1 -1
- package/dist/models/refresh-token-dto.d.ts +1 -1
- package/dist/models/refresh-token-dto.js +1 -1
- package/dist/models/reset-password-request-dto.d.ts +1 -1
- package/dist/models/reset-password-request-dto.js +1 -1
- package/dist/models/role-class.d.ts +1 -1
- package/dist/models/role-class.js +1 -1
- package/dist/models/user-class.d.ts +1 -1
- package/dist/models/user-class.js +1 -1
- package/index.ts +1 -1
- package/models/create-org-and-user-request-dto.ts +1 -1
- package/models/create-org-and-user-response-class.ts +1 -1
- package/models/create-user-request-dto.ts +1 -1
- package/models/create-user-response-class.ts +1 -1
- package/models/forgot-password-request-dto.ts +1 -1
- package/models/get-samllogin-link-request-dto.ts +1 -1
- package/models/login-by-samlrequest-dto.ts +1 -1
- package/models/login-class.ts +1 -1
- package/models/login-request-dto.ts +1 -1
- package/models/logout-request-dto.ts +1 -1
- package/models/organization-class.ts +10 -4
- package/models/refresh-token-dto.ts +1 -1
- package/models/reset-password-request-dto.ts +1 -1
- package/models/role-class.ts +1 -1
- package/models/user-class.ts +1 -1
- 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-node@1.0.0
|
|
20
|
+
npm install @emilgroup/auth-sdk-node@1.0.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/auth-sdk-node@1.0.0
|
|
24
|
+
yarn add @emilgroup/auth-sdk-node@1.0.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import ``.
|
package/api/authservice-api.ts
CHANGED
package/api.ts
CHANGED
package/base.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The EMIL AuthService API description
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
|
-
*
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
@@ -170,7 +170,7 @@ export class BaseAPI {
|
|
|
170
170
|
this.configuration.refreshToken = refreshToken;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
async
|
|
173
|
+
async refreshTokenInternal(): Promise<string> {
|
|
174
174
|
const { username, refreshToken } = this.configuration;
|
|
175
175
|
|
|
176
176
|
|
|
@@ -220,7 +220,7 @@ export class BaseAPI {
|
|
|
220
220
|
if (err.response.status === 401 && !originalConfig._retry) {
|
|
221
221
|
originalConfig._retry = true;
|
|
222
222
|
try {
|
|
223
|
-
const tokenString = await this.
|
|
223
|
+
const tokenString = await this.refreshTokenInternal();
|
|
224
224
|
const accessToken = `Bearer ${tokenString}`;
|
|
225
225
|
|
|
226
226
|
originalConfig.headers['Authorization'] = `Bearer ${accessToken}`
|
|
@@ -245,7 +245,7 @@ export class BaseAPI {
|
|
|
245
245
|
){
|
|
246
246
|
_retry_count++;
|
|
247
247
|
try {
|
|
248
|
-
const tokenString = await this.
|
|
248
|
+
const tokenString = await this.refreshTokenInternal();
|
|
249
249
|
const accessToken = `Bearer ${tokenString}`;
|
|
250
250
|
|
|
251
251
|
_retry = true;
|
package/common.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The EMIL AuthService API description
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
|
-
*
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
@@ -144,7 +144,7 @@ export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxi
|
|
|
144
144
|
* The EMIL AuthService API description
|
|
145
145
|
*
|
|
146
146
|
* The version of the OpenAPI document: 1.0
|
|
147
|
-
*
|
|
147
|
+
* Contact: kontakt@emil.de
|
|
148
148
|
*
|
|
149
149
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
150
150
|
* https://openapi-generator.tech
|
package/configuration.ts
CHANGED
package/dist/api.d.ts
CHANGED
package/dist/api.js
CHANGED
package/dist/base.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* The EMIL AuthService API description
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
9
|
* https://openapi-generator.tech
|
|
@@ -59,7 +59,7 @@ export declare class BaseAPI {
|
|
|
59
59
|
private readEnvVariables;
|
|
60
60
|
selectEnvironment(env: Environment): void;
|
|
61
61
|
authorize(username: string, password: string): Promise<void>;
|
|
62
|
-
|
|
62
|
+
refreshTokenInternal(): Promise<string>;
|
|
63
63
|
private extractRefreshToken;
|
|
64
64
|
getConfiguration(): Configuration;
|
|
65
65
|
private attachInterceptor;
|
package/dist/base.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* The EMIL AuthService API description
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: 1.0
|
|
9
|
-
*
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
|
@@ -270,7 +270,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
270
270
|
});
|
|
271
271
|
});
|
|
272
272
|
};
|
|
273
|
-
BaseAPI.prototype.
|
|
273
|
+
BaseAPI.prototype.refreshTokenInternal = function () {
|
|
274
274
|
return __awaiter(this, void 0, void 0, function () {
|
|
275
275
|
var _a, username, refreshToken, options, accessToken;
|
|
276
276
|
return __generator(this, function (_b) {
|
|
@@ -324,7 +324,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
324
324
|
_a.label = 1;
|
|
325
325
|
case 1:
|
|
326
326
|
_a.trys.push([1, 3, , 4]);
|
|
327
|
-
return [4 /*yield*/, this.
|
|
327
|
+
return [4 /*yield*/, this.refreshTokenInternal()];
|
|
328
328
|
case 2:
|
|
329
329
|
tokenString = _a.sent();
|
|
330
330
|
accessToken = "Bearer ".concat(tokenString);
|
|
@@ -351,7 +351,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
351
351
|
_a.label = 6;
|
|
352
352
|
case 6:
|
|
353
353
|
_a.trys.push([6, 8, , 9]);
|
|
354
|
-
return [4 /*yield*/, this.
|
|
354
|
+
return [4 /*yield*/, this.refreshTokenInternal()];
|
|
355
355
|
case 7:
|
|
356
356
|
tokenString = _a.sent();
|
|
357
357
|
accessToken = "Bearer ".concat(tokenString);
|
package/dist/common.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* The EMIL AuthService API description
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
9
|
* https://openapi-generator.tech
|
|
@@ -69,7 +69,7 @@ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios
|
|
|
69
69
|
* The EMIL AuthService API description
|
|
70
70
|
*
|
|
71
71
|
* The version of the OpenAPI document: 1.0
|
|
72
|
-
*
|
|
72
|
+
* Contact: kontakt@emil.de
|
|
73
73
|
*
|
|
74
74
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
75
75
|
* https://openapi-generator.tech
|
package/dist/common.js
CHANGED
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* The EMIL AuthService API description
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
9
|
* https://openapi-generator.tech
|
|
@@ -29,16 +29,22 @@ export interface OrganizationClass {
|
|
|
29
29
|
'code': string;
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
|
-
* @type {
|
|
32
|
+
* @type {number}
|
|
33
33
|
* @memberof OrganizationClass
|
|
34
34
|
*/
|
|
35
|
-
'parentId'?:
|
|
35
|
+
'parentId'?: number;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof OrganizationClass
|
|
40
40
|
*/
|
|
41
41
|
'email': string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof OrganizationClass
|
|
46
|
+
*/
|
|
47
|
+
'ern'?: string;
|
|
42
48
|
/**
|
|
43
49
|
*
|
|
44
50
|
* @type {string}
|
|
@@ -98,5 +104,5 @@ export interface OrganizationClass {
|
|
|
98
104
|
* @type {string}
|
|
99
105
|
* @memberof OrganizationClass
|
|
100
106
|
*/
|
|
101
|
-
'deletedAt'?: string;
|
|
107
|
+
'deletedAt'?: string | null;
|
|
102
108
|
}
|
package/index.ts
CHANGED
package/models/login-class.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The EMIL AuthService API description
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
|
-
*
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
@@ -34,16 +34,22 @@ export interface OrganizationClass {
|
|
|
34
34
|
'code': string;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
|
-
* @type {
|
|
37
|
+
* @type {number}
|
|
38
38
|
* @memberof OrganizationClass
|
|
39
39
|
*/
|
|
40
|
-
'parentId'?:
|
|
40
|
+
'parentId'?: number;
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
43
|
* @type {string}
|
|
44
44
|
* @memberof OrganizationClass
|
|
45
45
|
*/
|
|
46
46
|
'email': string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof OrganizationClass
|
|
51
|
+
*/
|
|
52
|
+
'ern'?: string;
|
|
47
53
|
/**
|
|
48
54
|
*
|
|
49
55
|
* @type {string}
|
|
@@ -103,6 +109,6 @@ export interface OrganizationClass {
|
|
|
103
109
|
* @type {string}
|
|
104
110
|
* @memberof OrganizationClass
|
|
105
111
|
*/
|
|
106
|
-
'deletedAt'?: string;
|
|
112
|
+
'deletedAt'?: string | null;
|
|
107
113
|
}
|
|
108
114
|
|
package/models/role-class.ts
CHANGED
package/models/user-class.ts
CHANGED