Skip to content

Commit d2ccdc6

Browse files
committed
Added mail_otp and sms_otp
1 parent 6681bb9 commit d2ccdc6

File tree

4 files changed

+44
-12
lines changed

4 files changed

+44
-12
lines changed

CustomApi/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ $username = 'username_example'; // string | Username
6161
$password = 'password_example'; // string | User Password
6262
$client_id = 'client_id_example'; // string | Client id
6363
$otp = 'otp_example'; // string | App OTP
64+
$mail_otp = 'mail_otp_example'; // string | Mail OTP
65+
$sms_otp = 'sms_otp_example'; // string | SMS OTP
6466
$recovery_code = 'recovery_code_example'; // string | Recovery Code
6567
$refresh_token = 'refresh_token_example'; // string | Refresh Token
6668

6769
try {
68-
$result = $apiInstance->realmsRealmProtocolOpenidConnectTokenPost($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $recovery_code, $refresh_token);
70+
$result = $apiInstance->realmsRealmProtocolOpenidConnectTokenPost($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $mail_otp, $sms_otp, $recovery_code, $refresh_token);
6971
print_r($result);
7072
} catch (Exception $e) {
7173
echo 'Exception when calling CustomApi->realmsRealmProtocolOpenidConnectTokenPost: ', $e->getMessage(), PHP_EOL;

CustomApi/docs/Api/CustomApi.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth
1010
## `realmsRealmProtocolOpenidConnectTokenPost()`
1111

1212
```php
13-
realmsRealmProtocolOpenidConnectTokenPost($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $recovery_code, $refresh_token): \WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response
13+
realmsRealmProtocolOpenidConnectTokenPost($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $mail_otp, $sms_otp, $recovery_code, $refresh_token): \WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response
1414
```
1515

1616
Oidc Login
@@ -37,11 +37,13 @@ $username = 'username_example'; // string | Username
3737
$password = 'password_example'; // string | User Password
3838
$client_id = 'client_id_example'; // string | Client id
3939
$otp = 'otp_example'; // string | App OTP
40+
$mail_otp = 'mail_otp_example'; // string | Mail OTP
41+
$sms_otp = 'sms_otp_example'; // string | SMS OTP
4042
$recovery_code = 'recovery_code_example'; // string | Recovery Code
4143
$refresh_token = 'refresh_token_example'; // string | Refresh Token
4244

4345
try {
44-
$result = $apiInstance->realmsRealmProtocolOpenidConnectTokenPost($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $recovery_code, $refresh_token);
46+
$result = $apiInstance->realmsRealmProtocolOpenidConnectTokenPost($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $mail_otp, $sms_otp, $recovery_code, $refresh_token);
4547
print_r($result);
4648
} catch (Exception $e) {
4749
echo 'Exception when calling CustomApi->realmsRealmProtocolOpenidConnectTokenPost: ', $e->getMessage(), PHP_EOL;
@@ -59,6 +61,8 @@ try {
5961
| **password** | **string**| User Password | [optional] |
6062
| **client_id** | **string**| Client id | [optional] |
6163
| **otp** | **string**| App OTP | [optional] |
64+
| **mail_otp** | **string**| Mail OTP | [optional] |
65+
| **sms_otp** | **string**| SMS OTP | [optional] |
6266
| **recovery_code** | **string**| Recovery Code | [optional] |
6367
| **refresh_token** | **string**| Refresh Token | [optional] |
6468

CustomApi/lib/Api/CustomApi.php

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ public function getConfig()
134134
* @param string|null $password User Password (optional)
135135
* @param string|null $client_id Client id (optional)
136136
* @param string|null $otp App OTP (optional)
137+
* @param string|null $mail_otp Mail OTP (optional)
138+
* @param string|null $sms_otp SMS OTP (optional)
137139
* @param string|null $recovery_code Recovery Code (optional)
138140
* @param string|null $refresh_token Refresh Token (optional)
139141
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
@@ -142,9 +144,9 @@ public function getConfig()
142144
* @throws \InvalidArgumentException
143145
* @return \WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response|\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost400Response|\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost400Response
144146
*/
145-
public function realmsRealmProtocolOpenidConnectTokenPost($realm, $authorization = null, $grant_type = 'refresh_token', $username = null, $password = null, $client_id = null, $otp = null, $recovery_code = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
147+
public function realmsRealmProtocolOpenidConnectTokenPost($realm, $authorization = null, $grant_type = 'refresh_token', $username = null, $password = null, $client_id = null, $otp = null, $mail_otp = null, $sms_otp = null, $recovery_code = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
146148
{
147-
list($response) = $this->realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $recovery_code, $refresh_token, $contentType);
149+
list($response) = $this->realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $mail_otp, $sms_otp, $recovery_code, $refresh_token, $contentType);
148150
return $response;
149151
}
150152

@@ -160,6 +162,8 @@ public function realmsRealmProtocolOpenidConnectTokenPost($realm, $authorization
160162
* @param string|null $password User Password (optional)
161163
* @param string|null $client_id Client id (optional)
162164
* @param string|null $otp App OTP (optional)
165+
* @param string|null $mail_otp Mail OTP (optional)
166+
* @param string|null $sms_otp SMS OTP (optional)
163167
* @param string|null $recovery_code Recovery Code (optional)
164168
* @param string|null $refresh_token Refresh Token (optional)
165169
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
@@ -168,9 +172,9 @@ public function realmsRealmProtocolOpenidConnectTokenPost($realm, $authorization
168172
* @throws \InvalidArgumentException
169173
* @return array of \WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response|\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost400Response|\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost400Response, HTTP status code, HTTP response headers (array of strings)
170174
*/
171-
public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $authorization = null, $grant_type = 'refresh_token', $username = null, $password = null, $client_id = null, $otp = null, $recovery_code = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
175+
public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $authorization = null, $grant_type = 'refresh_token', $username = null, $password = null, $client_id = null, $otp = null, $mail_otp = null, $sms_otp = null, $recovery_code = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
172176
{
173-
$request = $this->realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $recovery_code, $refresh_token, $contentType);
177+
$request = $this->realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $mail_otp, $sms_otp, $recovery_code, $refresh_token, $contentType);
174178

175179
try {
176180
$options = $this->createHttpClientOption();
@@ -363,16 +367,18 @@ public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $a
363367
* @param string|null $password User Password (optional)
364368
* @param string|null $client_id Client id (optional)
365369
* @param string|null $otp App OTP (optional)
370+
* @param string|null $mail_otp Mail OTP (optional)
371+
* @param string|null $sms_otp SMS OTP (optional)
366372
* @param string|null $recovery_code Recovery Code (optional)
367373
* @param string|null $refresh_token Refresh Token (optional)
368374
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
369375
*
370376
* @throws \InvalidArgumentException
371377
* @return \GuzzleHttp\Promise\PromiseInterface
372378
*/
373-
public function realmsRealmProtocolOpenidConnectTokenPostAsync($realm, $authorization = null, $grant_type = 'refresh_token', $username = null, $password = null, $client_id = null, $otp = null, $recovery_code = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
379+
public function realmsRealmProtocolOpenidConnectTokenPostAsync($realm, $authorization = null, $grant_type = 'refresh_token', $username = null, $password = null, $client_id = null, $otp = null, $mail_otp = null, $sms_otp = null, $recovery_code = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
374380
{
375-
return $this->realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $recovery_code, $refresh_token, $contentType)
381+
return $this->realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $mail_otp, $sms_otp, $recovery_code, $refresh_token, $contentType)
376382
->then(
377383
function ($response) {
378384
return $response[0];
@@ -392,17 +398,19 @@ function ($response) {
392398
* @param string|null $password User Password (optional)
393399
* @param string|null $client_id Client id (optional)
394400
* @param string|null $otp App OTP (optional)
401+
* @param string|null $mail_otp Mail OTP (optional)
402+
* @param string|null $sms_otp SMS OTP (optional)
395403
* @param string|null $recovery_code Recovery Code (optional)
396404
* @param string|null $refresh_token Refresh Token (optional)
397405
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
398406
*
399407
* @throws \InvalidArgumentException
400408
* @return \GuzzleHttp\Promise\PromiseInterface
401409
*/
402-
public function realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo($realm, $authorization = null, $grant_type = 'refresh_token', $username = null, $password = null, $client_id = null, $otp = null, $recovery_code = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
410+
public function realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo($realm, $authorization = null, $grant_type = 'refresh_token', $username = null, $password = null, $client_id = null, $otp = null, $mail_otp = null, $sms_otp = null, $recovery_code = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
403411
{
404412
$returnType = '\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response';
405-
$request = $this->realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $recovery_code, $refresh_token, $contentType);
413+
$request = $this->realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $authorization, $grant_type, $username, $password, $client_id, $otp, $mail_otp, $sms_otp, $recovery_code, $refresh_token, $contentType);
406414

407415
return $this->client
408416
->sendAsync($request, $this->createHttpClientOption())
@@ -450,14 +458,16 @@ function ($exception) {
450458
* @param string|null $password User Password (optional)
451459
* @param string|null $client_id Client id (optional)
452460
* @param string|null $otp App OTP (optional)
461+
* @param string|null $mail_otp Mail OTP (optional)
462+
* @param string|null $sms_otp SMS OTP (optional)
453463
* @param string|null $recovery_code Recovery Code (optional)
454464
* @param string|null $refresh_token Refresh Token (optional)
455465
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
456466
*
457467
* @throws \InvalidArgumentException
458468
* @return \GuzzleHttp\Psr7\Request
459469
*/
460-
public function realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $authorization = null, $grant_type = 'refresh_token', $username = null, $password = null, $client_id = null, $otp = null, $recovery_code = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
470+
public function realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $authorization = null, $grant_type = 'refresh_token', $username = null, $password = null, $client_id = null, $otp = null, $mail_otp = null, $sms_otp = null, $recovery_code = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
461471
{
462472

463473
// verify the required parameter 'realm' is set
@@ -476,6 +486,8 @@ public function realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $author
476486

477487

478488

489+
490+
479491
$resourcePath = '/realms/{realm}/protocol/openid-connect/token';
480492
$formParams = [];
481493
$queryParams = [];
@@ -519,6 +531,14 @@ public function realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $author
519531
$formParams = array_merge($formParams, ObjectSerializer::toFormValue('otp', $otp));
520532
}
521533
// form params
534+
if ($mail_otp !== null) {
535+
$formParams = array_merge($formParams, ObjectSerializer::toFormValue('mail_otp', $mail_otp));
536+
}
537+
// form params
538+
if ($sms_otp !== null) {
539+
$formParams = array_merge($formParams, ObjectSerializer::toFormValue('sms_otp', $sms_otp));
540+
}
541+
// form params
522542
if ($recovery_code !== null) {
523543
$formParams = array_merge($formParams, ObjectSerializer::toFormValue('recovery_code', $recovery_code));
524544
}

custom.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ components:
140140
otp:
141141
type: string
142142
description: App OTP
143+
mail_otp:
144+
type: string
145+
description: Mail OTP
146+
sms_otp:
147+
type: string
148+
description: SMS OTP
143149
recovery_code:
144150
type: string
145151
description: Recovery Code

0 commit comments

Comments
 (0)