Skip to content

Commit 120c17c

Browse files
DEVEX-1891 MFA token
1 parent d42992d commit 120c17c

File tree

2 files changed

+36
-56
lines changed

2 files changed

+36
-56
lines changed

api/defaultApi.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3614,13 +3614,19 @@ export class DefaultApi {
36143614
*/
36153615
public async generateMfaToken(
36163616
authorization: string,
3617+
userId: number,
36173618
generateMfaTokenRequest: GenerateMfaTokenRequest,
36183619
options: { headers: { [name: string]: string } } = { headers: {} }
36193620
): Promise<{
36203621
response: http.IncomingMessage;
36213622
body: GenerateMfaToken200Response;
36223623
}> {
3623-
const localVarPath = this.basePath + "/api/2/mfa/users/{user_id}/mfa_token";
3624+
const localVarPath =
3625+
this.basePath +
3626+
"/api/1/users/{user_id}/mfa_token".replace(
3627+
"{" + "user_id" + "}",
3628+
encodeURIComponent(String(userId))
3629+
);
36243630
let localVarQueryParameters: any = {};
36253631
let localVarHeaderParams: any = (<any>Object).assign(
36263632
{},
Lines changed: 29 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,35 @@
1-
/**
2-
* OneLogin API
3-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4-
*
5-
* The version of the OpenAPI document: 3.0.0-alpha.1
6-
*
7-
*
8-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9-
* https://openapi-generator.tech
10-
* Do not edit the class manually.
11-
*/
1+
export class GenerateMfaToken200Response {
2+
"mfaToken"?: string;
123

13-
import { RequestFile } from './models';
4+
"reusable"?: boolean;
145

15-
export class GenerateMfaToken200Response {
16-
/**
17-
* Token can function as a temporary MFA token. It can be used to authenticate for any app when valid.
18-
*/
19-
'mfaToken'?: string;
20-
/**
21-
* true indcates the token can be used multiple times. false indicates the token is invalid after a single use
22-
*/
23-
'reusable'?: boolean;
24-
/**
25-
* Defines the expiration time and date for the token. Format is UTC time.
26-
*/
27-
'expiresAt'?: string;
28-
/**
29-
* Defines the expiration time and date for the token. Format is UTC time.
30-
*/
31-
'deviceId'?: string;
6+
"expiresAt"?: string;
327

33-
static discriminator: string | undefined = undefined;
8+
static discriminator: string | undefined = undefined;
349

35-
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
36-
{
37-
"name": "mfaToken",
38-
"baseName": "mfa_token",
39-
"type": "string"
40-
},
41-
{
42-
"name": "reusable",
43-
"baseName": "reusable",
44-
"type": "boolean"
45-
},
46-
{
47-
"name": "expiresAt",
48-
"baseName": "expires_at",
49-
"type": "string"
50-
},
51-
{
52-
"name": "deviceId",
53-
"baseName": "device_id",
54-
"type": "string"
55-
} ];
10+
static attributeTypeMap: Array<{
11+
name: string;
12+
baseName: string;
13+
type: string;
14+
}> = [
15+
{
16+
name: "mfaToken",
17+
baseName: "mfa_token",
18+
type: "string",
19+
},
20+
{
21+
name: "reusable",
22+
baseName: "reusable",
23+
type: "boolean",
24+
},
25+
{
26+
name: "expiresAt",
27+
baseName: "expires_at",
28+
type: "string",
29+
},
30+
];
5631

57-
static getAttributeTypeMap() {
58-
return GenerateMfaToken200Response.attributeTypeMap;
59-
}
32+
static getAttributeTypeMap() {
33+
return GenerateMfaToken200Response.attributeTypeMap;
34+
}
6035
}
61-

0 commit comments

Comments
 (0)