1616 *
1717 * The version of the OpenAPI document: 1.0
1818 * Generated by: https://openapi-generator.tech
19- * Generator version: 7.9 .0-SNAPSHOT
19+ * Generator version: 7.10 .0-SNAPSHOT
2020 */
2121
2222/**
@@ -128,19 +128,20 @@ public function getConfig()
128128 * Oidc Login
129129 *
130130 * @param string $realm realm name (not id!) (required)
131- * @param string $username Username (required)
132- * @param string $password User Password (required)
133- * @param string $client_id Client id (required)
134- * @param string $grant_type Grant Type (required)
131+ * @param string $username Username (optional)
132+ * @param string $password User Password (optional)
133+ * @param string $client_id Client id (optional)
134+ * @param string $grant_type Grant Type (optional)
135+ * @param string $refresh_token Refresh Token (optional)
135136 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
136137 *
137138 * @throws \WebMI\KeycloakApiClient\CustomApi\ApiException on non-2xx response or if the response body is not in the expected format
138139 * @throws \InvalidArgumentException
139140 * @return \WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response|\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost400Response|\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost400Response
140141 */
141- public function realmsRealmProtocolOpenidConnectTokenPost ($ realm , $ username , $ password , $ client_id , $ grant_type , string $ contentType = self ::contentTypes['realmsRealmProtocolOpenidConnectTokenPost ' ][0 ])
142+ public function realmsRealmProtocolOpenidConnectTokenPost ($ realm , $ username = null , $ password = null , $ client_id = null , $ grant_type = null , $ refresh_token = null , string $ contentType = self ::contentTypes['realmsRealmProtocolOpenidConnectTokenPost ' ][0 ])
142143 {
143- list ($ response ) = $ this ->realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo ($ realm , $ username , $ password , $ client_id , $ grant_type , $ contentType );
144+ list ($ response ) = $ this ->realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo ($ realm , $ username , $ password , $ client_id , $ grant_type , $ refresh_token , $ contentType );
144145 return $ response ;
145146 }
146147
@@ -150,19 +151,20 @@ public function realmsRealmProtocolOpenidConnectTokenPost($realm, $username, $pa
150151 * Oidc Login
151152 *
152153 * @param string $realm realm name (not id!) (required)
153- * @param string $username Username (required)
154- * @param string $password User Password (required)
155- * @param string $client_id Client id (required)
156- * @param string $grant_type Grant Type (required)
154+ * @param string $username Username (optional)
155+ * @param string $password User Password (optional)
156+ * @param string $client_id Client id (optional)
157+ * @param string $grant_type Grant Type (optional)
158+ * @param string $refresh_token Refresh Token (optional)
157159 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
158160 *
159161 * @throws \WebMI\KeycloakApiClient\CustomApi\ApiException on non-2xx response or if the response body is not in the expected format
160162 * @throws \InvalidArgumentException
161163 * @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)
162164 */
163- public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo ($ realm , $ username , $ password , $ client_id , $ grant_type , string $ contentType = self ::contentTypes['realmsRealmProtocolOpenidConnectTokenPost ' ][0 ])
165+ public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo ($ realm , $ username = null , $ password = null , $ client_id = null , $ grant_type = null , $ refresh_token = null , string $ contentType = self ::contentTypes['realmsRealmProtocolOpenidConnectTokenPost ' ][0 ])
164166 {
165- $ request = $ this ->realmsRealmProtocolOpenidConnectTokenPostRequest ($ realm , $ username , $ password , $ client_id , $ grant_type , $ contentType );
167+ $ request = $ this ->realmsRealmProtocolOpenidConnectTokenPostRequest ($ realm , $ username , $ password , $ client_id , $ grant_type , $ refresh_token , $ contentType );
166168
167169 try {
168170 $ options = $ this ->createHttpClientOption ();
@@ -186,18 +188,6 @@ public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $u
186188
187189 $ statusCode = $ response ->getStatusCode ();
188190
189- if ($ statusCode < 200 || $ statusCode > 299 ) {
190- throw new ApiException (
191- sprintf (
192- '[%d] Error connecting to the API (%s) ' ,
193- $ statusCode ,
194- (string ) $ request ->getUri ()
195- ),
196- $ statusCode ,
197- $ response ->getHeaders (),
198- (string ) $ response ->getBody ()
199- );
200- }
201191
202192 switch ($ statusCode ) {
203193 case 200 :
@@ -283,6 +273,19 @@ public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $u
283273 ];
284274 }
285275
276+ if ($ statusCode < 200 || $ statusCode > 299 ) {
277+ throw new ApiException (
278+ sprintf (
279+ '[%d] Error connecting to the API (%s) ' ,
280+ $ statusCode ,
281+ (string ) $ request ->getUri ()
282+ ),
283+ $ statusCode ,
284+ $ response ->getHeaders (),
285+ (string ) $ response ->getBody ()
286+ );
287+ }
288+
286289 $ returnType = '\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response ' ;
287290 if ($ returnType === '\SplFileObject ' ) {
288291 $ content = $ response ->getBody (); //stream goes to serializer
@@ -348,18 +351,19 @@ public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $u
348351 * Oidc Login
349352 *
350353 * @param string $realm realm name (not id!) (required)
351- * @param string $username Username (required)
352- * @param string $password User Password (required)
353- * @param string $client_id Client id (required)
354- * @param string $grant_type Grant Type (required)
354+ * @param string $username Username (optional)
355+ * @param string $password User Password (optional)
356+ * @param string $client_id Client id (optional)
357+ * @param string $grant_type Grant Type (optional)
358+ * @param string $refresh_token Refresh Token (optional)
355359 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
356360 *
357361 * @throws \InvalidArgumentException
358362 * @return \GuzzleHttp\Promise\PromiseInterface
359363 */
360- public function realmsRealmProtocolOpenidConnectTokenPostAsync ($ realm , $ username , $ password , $ client_id , $ grant_type , string $ contentType = self ::contentTypes['realmsRealmProtocolOpenidConnectTokenPost ' ][0 ])
364+ public function realmsRealmProtocolOpenidConnectTokenPostAsync ($ realm , $ username = null , $ password = null , $ client_id = null , $ grant_type = null , $ refresh_token = null , string $ contentType = self ::contentTypes['realmsRealmProtocolOpenidConnectTokenPost ' ][0 ])
361365 {
362- return $ this ->realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo ($ realm , $ username , $ password , $ client_id , $ grant_type , $ contentType )
366+ return $ this ->realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo ($ realm , $ username , $ password , $ client_id , $ grant_type , $ refresh_token , $ contentType )
363367 ->then (
364368 function ($ response ) {
365369 return $ response [0 ];
@@ -373,19 +377,20 @@ function ($response) {
373377 * Oidc Login
374378 *
375379 * @param string $realm realm name (not id!) (required)
376- * @param string $username Username (required)
377- * @param string $password User Password (required)
378- * @param string $client_id Client id (required)
379- * @param string $grant_type Grant Type (required)
380+ * @param string $username Username (optional)
381+ * @param string $password User Password (optional)
382+ * @param string $client_id Client id (optional)
383+ * @param string $grant_type Grant Type (optional)
384+ * @param string $refresh_token Refresh Token (optional)
380385 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
381386 *
382387 * @throws \InvalidArgumentException
383388 * @return \GuzzleHttp\Promise\PromiseInterface
384389 */
385- public function realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo ($ realm , $ username , $ password , $ client_id , $ grant_type , string $ contentType = self ::contentTypes['realmsRealmProtocolOpenidConnectTokenPost ' ][0 ])
390+ public function realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo ($ realm , $ username = null , $ password = null , $ client_id = null , $ grant_type = null , $ refresh_token = null , string $ contentType = self ::contentTypes['realmsRealmProtocolOpenidConnectTokenPost ' ][0 ])
386391 {
387392 $ returnType = '\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response ' ;
388- $ request = $ this ->realmsRealmProtocolOpenidConnectTokenPostRequest ($ realm , $ username , $ password , $ client_id , $ grant_type , $ contentType );
393+ $ request = $ this ->realmsRealmProtocolOpenidConnectTokenPostRequest ($ realm , $ username , $ password , $ client_id , $ grant_type , $ refresh_token , $ contentType );
389394
390395 return $ this ->client
391396 ->sendAsync ($ request , $ this ->createHttpClientOption ())
@@ -427,16 +432,17 @@ function ($exception) {
427432 * Create request for operation 'realmsRealmProtocolOpenidConnectTokenPost'
428433 *
429434 * @param string $realm realm name (not id!) (required)
430- * @param string $username Username (required)
431- * @param string $password User Password (required)
432- * @param string $client_id Client id (required)
433- * @param string $grant_type Grant Type (required)
435+ * @param string $username Username (optional)
436+ * @param string $password User Password (optional)
437+ * @param string $client_id Client id (optional)
438+ * @param string $grant_type Grant Type (optional)
439+ * @param string $refresh_token Refresh Token (optional)
434440 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
435441 *
436442 * @throws \InvalidArgumentException
437443 * @return \GuzzleHttp\Psr7\Request
438444 */
439- public function realmsRealmProtocolOpenidConnectTokenPostRequest ($ realm , $ username , $ password , $ client_id , $ grant_type , string $ contentType = self ::contentTypes['realmsRealmProtocolOpenidConnectTokenPost ' ][0 ])
445+ public function realmsRealmProtocolOpenidConnectTokenPostRequest ($ realm , $ username = null , $ password = null , $ client_id = null , $ grant_type = null , $ refresh_token = null , string $ contentType = self ::contentTypes['realmsRealmProtocolOpenidConnectTokenPost ' ][0 ])
440446 {
441447
442448 // verify the required parameter 'realm' is set
@@ -446,33 +452,10 @@ public function realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $userna
446452 );
447453 }
448454
449- // verify the required parameter 'username' is set
450- if ($ username === null || (is_array ($ username ) && count ($ username ) === 0 )) {
451- throw new \InvalidArgumentException (
452- 'Missing the required parameter $username when calling realmsRealmProtocolOpenidConnectTokenPost '
453- );
454- }
455455
456- // verify the required parameter 'password' is set
457- if ($ password === null || (is_array ($ password ) && count ($ password ) === 0 )) {
458- throw new \InvalidArgumentException (
459- 'Missing the required parameter $password when calling realmsRealmProtocolOpenidConnectTokenPost '
460- );
461- }
462456
463- // verify the required parameter 'client_id' is set
464- if ($ client_id === null || (is_array ($ client_id ) && count ($ client_id ) === 0 )) {
465- throw new \InvalidArgumentException (
466- 'Missing the required parameter $client_id when calling realmsRealmProtocolOpenidConnectTokenPost '
467- );
468- }
469457
470- // verify the required parameter 'grant_type' is set
471- if ($ grant_type === null || (is_array ($ grant_type ) && count ($ grant_type ) === 0 )) {
472- throw new \InvalidArgumentException (
473- 'Missing the required parameter $grant_type when calling realmsRealmProtocolOpenidConnectTokenPost '
474- );
475- }
458+
476459
477460
478461 $ resourcePath = '/realms/{realm}/protocol/openid-connect/token ' ;
@@ -509,6 +492,10 @@ public function realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $userna
509492 if ($ grant_type !== null ) {
510493 $ formParams ['grant_type ' ] = ObjectSerializer::toFormValue ($ grant_type );
511494 }
495+ // form params
496+ if ($ refresh_token !== null ) {
497+ $ formParams ['refresh_token ' ] = ObjectSerializer::toFormValue ($ refresh_token );
498+ }
512499
513500 $ headers = $ this ->headerSelector ->selectHeaders (
514501 ['application/json ' , ],
0 commit comments