Skip to content

Commit 258c910

Browse files
committed
update verifyOAuthToken
1 parent 5608e3b commit 258c910

6 files changed

+113
-113
lines changed

src/apis/iamApiWrapper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class IamApiWrapper extends BaseApiWrapper<AdminAuthenticationApi> {
3232
* @param token Specifies the auth token.
3333
*/
3434
public async verifyOAuthToken(req: AuthenticateOAuthRequest): Promise<PlayerResponse> {
35-
return await this.api.verifyOAuthToken(req.provider, req);
35+
return await this.api.verifyOAuthToken(req);
3636
}
3737

3838
/**

src/generated/apis/AdminAuthenticationApi.ts

+24-24
Original file line numberDiff line numberDiff line change
@@ -320,20 +320,28 @@ export class AdminAuthenticationApiRequestFactory extends BaseAPIRequestFactory
320320

321321
/**
322322
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
323-
* Retrieve player by oauth token.
324-
* @param authenticateOAuthRequest
323+
* Retrieve player by token.
324+
* @param provider OAuth provider
325+
* @param oAuthRequest
325326
*/
326-
public async verifyOAuth(authenticateOAuthRequest: AuthenticateOAuthRequest, _options?: Configuration): Promise<RequestContext> {
327+
public async verifyOAuth(provider: OAuthProvider, oAuthRequest: OAuthRequest, _options?: Configuration): Promise<RequestContext> {
327328
let _config = _options || this.configuration;
328329

329-
// verify required parameter 'authenticateOAuthRequest' is not null or undefined
330-
if (authenticateOAuthRequest === null || authenticateOAuthRequest === undefined) {
331-
throw new RequiredError("AdminAuthenticationApi", "verifyOAuth", "authenticateOAuthRequest");
330+
// verify required parameter 'provider' is not null or undefined
331+
if (provider === null || provider === undefined) {
332+
throw new RequiredError("AdminAuthenticationApi", "verifyOAuth", "provider");
333+
}
334+
335+
336+
// verify required parameter 'oAuthRequest' is not null or undefined
337+
if (oAuthRequest === null || oAuthRequest === undefined) {
338+
throw new RequiredError("AdminAuthenticationApi", "verifyOAuth", "oAuthRequest");
332339
}
333340

334341

335342
// Path Params
336-
const localVarPath = '/iam/v1/oauth/verify';
343+
const localVarPath = '/iam/v1/oauth/{provider}/verify'
344+
.replace('{' + 'provider' + '}', encodeURIComponent(String(provider)));
337345

338346
// Make Request Context
339347
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
@@ -346,7 +354,7 @@ export class AdminAuthenticationApiRequestFactory extends BaseAPIRequestFactory
346354
]);
347355
requestContext.setHeaderParam("Content-Type", contentType);
348356
const serializedBody = ObjectSerializer.stringify(
349-
ObjectSerializer.serialize(authenticateOAuthRequest, "AuthenticateOAuthRequest", ""),
357+
ObjectSerializer.serialize(oAuthRequest, "OAuthRequest", ""),
350358
contentType
351359
);
352360
requestContext.setBody(serializedBody);
@@ -368,28 +376,20 @@ export class AdminAuthenticationApiRequestFactory extends BaseAPIRequestFactory
368376

369377
/**
370378
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
371-
* Retrieve player by token.
372-
* @param provider OAuth provider
373-
* @param oAuthRequest
379+
* Retrieve player by oauth token.
380+
* @param authenticateOAuthRequest
374381
*/
375-
public async verifyOAuthToken(provider: OAuthProvider, oAuthRequest: OAuthRequest, _options?: Configuration): Promise<RequestContext> {
382+
public async verifyOAuthToken(authenticateOAuthRequest: AuthenticateOAuthRequest, _options?: Configuration): Promise<RequestContext> {
376383
let _config = _options || this.configuration;
377384

378-
// verify required parameter 'provider' is not null or undefined
379-
if (provider === null || provider === undefined) {
380-
throw new RequiredError("AdminAuthenticationApi", "verifyOAuthToken", "provider");
381-
}
382-
383-
384-
// verify required parameter 'oAuthRequest' is not null or undefined
385-
if (oAuthRequest === null || oAuthRequest === undefined) {
386-
throw new RequiredError("AdminAuthenticationApi", "verifyOAuthToken", "oAuthRequest");
385+
// verify required parameter 'authenticateOAuthRequest' is not null or undefined
386+
if (authenticateOAuthRequest === null || authenticateOAuthRequest === undefined) {
387+
throw new RequiredError("AdminAuthenticationApi", "verifyOAuthToken", "authenticateOAuthRequest");
387388
}
388389

389390

390391
// Path Params
391-
const localVarPath = '/iam/v1/oauth/{provider}/verify'
392-
.replace('{' + 'provider' + '}', encodeURIComponent(String(provider)));
392+
const localVarPath = '/iam/v1/oauth/verify';
393393

394394
// Make Request Context
395395
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
@@ -402,7 +402,7 @@ export class AdminAuthenticationApiRequestFactory extends BaseAPIRequestFactory
402402
]);
403403
requestContext.setHeaderParam("Content-Type", contentType);
404404
const serializedBody = ObjectSerializer.stringify(
405-
ObjectSerializer.serialize(oAuthRequest, "OAuthRequest", ""),
405+
ObjectSerializer.serialize(authenticateOAuthRequest, "AuthenticateOAuthRequest", ""),
406406
contentType
407407
);
408408
requestContext.setBody(serializedBody);

src/generated/apis/AuthenticationApi.ts

+24-24
Original file line numberDiff line numberDiff line change
@@ -621,20 +621,28 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory {
621621

622622
/**
623623
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
624-
* Retrieve player by oauth token.
625-
* @param authenticateOAuthRequest
624+
* Retrieve player by token.
625+
* @param provider OAuth provider
626+
* @param oAuthRequest
626627
*/
627-
public async verifyOAuth(authenticateOAuthRequest: AuthenticateOAuthRequest, _options?: Configuration): Promise<RequestContext> {
628+
public async verifyOAuth(provider: OAuthProvider, oAuthRequest: OAuthRequest, _options?: Configuration): Promise<RequestContext> {
628629
let _config = _options || this.configuration;
629630

630-
// verify required parameter 'authenticateOAuthRequest' is not null or undefined
631-
if (authenticateOAuthRequest === null || authenticateOAuthRequest === undefined) {
632-
throw new RequiredError("AuthenticationApi", "verifyOAuth", "authenticateOAuthRequest");
631+
// verify required parameter 'provider' is not null or undefined
632+
if (provider === null || provider === undefined) {
633+
throw new RequiredError("AuthenticationApi", "verifyOAuth", "provider");
634+
}
635+
636+
637+
// verify required parameter 'oAuthRequest' is not null or undefined
638+
if (oAuthRequest === null || oAuthRequest === undefined) {
639+
throw new RequiredError("AuthenticationApi", "verifyOAuth", "oAuthRequest");
633640
}
634641

635642

636643
// Path Params
637-
const localVarPath = '/iam/v1/oauth/verify';
644+
const localVarPath = '/iam/v1/oauth/{provider}/verify'
645+
.replace('{' + 'provider' + '}', encodeURIComponent(String(provider)));
638646

639647
// Make Request Context
640648
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
@@ -647,7 +655,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory {
647655
]);
648656
requestContext.setHeaderParam("Content-Type", contentType);
649657
const serializedBody = ObjectSerializer.stringify(
650-
ObjectSerializer.serialize(authenticateOAuthRequest, "AuthenticateOAuthRequest", ""),
658+
ObjectSerializer.serialize(oAuthRequest, "OAuthRequest", ""),
651659
contentType
652660
);
653661
requestContext.setBody(serializedBody);
@@ -669,28 +677,20 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory {
669677

670678
/**
671679
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
672-
* Retrieve player by token.
673-
* @param provider OAuth provider
674-
* @param oAuthRequest
680+
* Retrieve player by oauth token.
681+
* @param authenticateOAuthRequest
675682
*/
676-
public async verifyOAuthToken(provider: OAuthProvider, oAuthRequest: OAuthRequest, _options?: Configuration): Promise<RequestContext> {
683+
public async verifyOAuthToken(authenticateOAuthRequest: AuthenticateOAuthRequest, _options?: Configuration): Promise<RequestContext> {
677684
let _config = _options || this.configuration;
678685

679-
// verify required parameter 'provider' is not null or undefined
680-
if (provider === null || provider === undefined) {
681-
throw new RequiredError("AuthenticationApi", "verifyOAuthToken", "provider");
682-
}
683-
684-
685-
// verify required parameter 'oAuthRequest' is not null or undefined
686-
if (oAuthRequest === null || oAuthRequest === undefined) {
687-
throw new RequiredError("AuthenticationApi", "verifyOAuthToken", "oAuthRequest");
686+
// verify required parameter 'authenticateOAuthRequest' is not null or undefined
687+
if (authenticateOAuthRequest === null || authenticateOAuthRequest === undefined) {
688+
throw new RequiredError("AuthenticationApi", "verifyOAuthToken", "authenticateOAuthRequest");
688689
}
689690

690691

691692
// Path Params
692-
const localVarPath = '/iam/v1/oauth/{provider}/verify'
693-
.replace('{' + 'provider' + '}', encodeURIComponent(String(provider)));
693+
const localVarPath = '/iam/v1/oauth/verify';
694694

695695
// Make Request Context
696696
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
@@ -703,7 +703,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory {
703703
]);
704704
requestContext.setHeaderParam("Content-Type", contentType);
705705
const serializedBody = ObjectSerializer.stringify(
706-
ObjectSerializer.serialize(oAuthRequest, "OAuthRequest", ""),
706+
ObjectSerializer.serialize(authenticateOAuthRequest, "AuthenticateOAuthRequest", ""),
707707
contentType
708708
);
709709
requestContext.setBody(serializedBody);

src/generated/types/ObjectParamAPI.ts

+28-28
Original file line numberDiff line numberDiff line change
@@ -608,27 +608,27 @@ export interface AdminAuthenticationApiVerifyAuthTokenRequest {
608608
}
609609

610610
export interface AdminAuthenticationApiVerifyOAuthRequest {
611+
/**
612+
* OAuth provider
613+
* @type OAuthProvider
614+
* @memberof AdminAuthenticationApiverifyOAuth
615+
*/
616+
provider: OAuthProvider
611617
/**
612618
*
613-
* @type AuthenticateOAuthRequest
619+
* @type OAuthRequest
614620
* @memberof AdminAuthenticationApiverifyOAuth
615621
*/
616-
authenticateOAuthRequest: AuthenticateOAuthRequest
622+
oAuthRequest: OAuthRequest
617623
}
618624

619625
export interface AdminAuthenticationApiVerifyOAuthTokenRequest {
620-
/**
621-
* OAuth provider
622-
* @type OAuthProvider
623-
* @memberof AdminAuthenticationApiverifyOAuthToken
624-
*/
625-
provider: OAuthProvider
626626
/**
627627
*
628-
* @type OAuthRequest
628+
* @type AuthenticateOAuthRequest
629629
* @memberof AdminAuthenticationApiverifyOAuthToken
630630
*/
631-
oAuthRequest: OAuthRequest
631+
authenticateOAuthRequest: AuthenticateOAuthRequest
632632
}
633633

634634
export class ObjectAdminAuthenticationApi {
@@ -703,20 +703,20 @@ export class ObjectAdminAuthenticationApi {
703703

704704
/**
705705
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
706-
* Retrieve player by oauth token.
706+
* Retrieve player by token.
707707
* @param param the request object
708708
*/
709709
public verifyOAuth(param: AdminAuthenticationApiVerifyOAuthRequest, options?: Configuration): Promise<PlayerResponse> {
710-
return this.api.verifyOAuth(param.authenticateOAuthRequest, options).toPromise();
710+
return this.api.verifyOAuth(param.provider, param.oAuthRequest, options).toPromise();
711711
}
712712

713713
/**
714714
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
715-
* Retrieve player by token.
715+
* Retrieve player by oauth token.
716716
* @param param the request object
717717
*/
718718
public verifyOAuthToken(param: AdminAuthenticationApiVerifyOAuthTokenRequest, options?: Configuration): Promise<PlayerResponse> {
719-
return this.api.verifyOAuthToken(param.provider, param.oAuthRequest, options).toPromise();
719+
return this.api.verifyOAuthToken(param.authenticateOAuthRequest, options).toPromise();
720720
}
721721

722722
}
@@ -848,27 +848,27 @@ export interface AuthenticationApiUnlinkSIWERequest {
848848
}
849849

850850
export interface AuthenticationApiVerifyOAuthRequest {
851+
/**
852+
* OAuth provider
853+
* @type OAuthProvider
854+
* @memberof AuthenticationApiverifyOAuth
855+
*/
856+
provider: OAuthProvider
851857
/**
852858
*
853-
* @type AuthenticateOAuthRequest
859+
* @type OAuthRequest
854860
* @memberof AuthenticationApiverifyOAuth
855861
*/
856-
authenticateOAuthRequest: AuthenticateOAuthRequest
862+
oAuthRequest: OAuthRequest
857863
}
858864

859865
export interface AuthenticationApiVerifyOAuthTokenRequest {
860-
/**
861-
* OAuth provider
862-
* @type OAuthProvider
863-
* @memberof AuthenticationApiverifyOAuthToken
864-
*/
865-
provider: OAuthProvider
866866
/**
867867
*
868-
* @type OAuthRequest
868+
* @type AuthenticateOAuthRequest
869869
* @memberof AuthenticationApiverifyOAuthToken
870870
*/
871-
oAuthRequest: OAuthRequest
871+
authenticateOAuthRequest: AuthenticateOAuthRequest
872872
}
873873

874874
export class ObjectAuthenticationApi {
@@ -991,20 +991,20 @@ export class ObjectAuthenticationApi {
991991

992992
/**
993993
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
994-
* Retrieve player by oauth token.
994+
* Retrieve player by token.
995995
* @param param the request object
996996
*/
997997
public verifyOAuth(param: AuthenticationApiVerifyOAuthRequest, options?: Configuration): Promise<PlayerResponse> {
998-
return this.api.verifyOAuth(param.authenticateOAuthRequest, options).toPromise();
998+
return this.api.verifyOAuth(param.provider, param.oAuthRequest, options).toPromise();
999999
}
10001000

10011001
/**
10021002
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
1003-
* Retrieve player by token.
1003+
* Retrieve player by oauth token.
10041004
* @param param the request object
10051005
*/
10061006
public verifyOAuthToken(param: AuthenticationApiVerifyOAuthTokenRequest, options?: Configuration): Promise<PlayerResponse> {
1007-
return this.api.verifyOAuthToken(param.provider, param.oAuthRequest, options).toPromise();
1007+
return this.api.verifyOAuthToken(param.authenticateOAuthRequest, options).toPromise();
10081008
}
10091009

10101010
}

src/generated/types/ObservableAPI.ts

+18-18
Original file line numberDiff line numberDiff line change
@@ -729,11 +729,12 @@ export class ObservableAdminAuthenticationApi {
729729

730730
/**
731731
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
732-
* Retrieve player by oauth token.
733-
* @param authenticateOAuthRequest
732+
* Retrieve player by token.
733+
* @param provider OAuth provider
734+
* @param oAuthRequest
734735
*/
735-
public verifyOAuth(authenticateOAuthRequest: AuthenticateOAuthRequest, _options?: Configuration): Observable<PlayerResponse> {
736-
const requestContextPromise = this.requestFactory.verifyOAuth(authenticateOAuthRequest, _options);
736+
public verifyOAuth(provider: OAuthProvider, oAuthRequest: OAuthRequest, _options?: Configuration): Observable<PlayerResponse> {
737+
const requestContextPromise = this.requestFactory.verifyOAuth(provider, oAuthRequest, _options);
737738

738739
// build promise chain
739740
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -753,12 +754,11 @@ export class ObservableAdminAuthenticationApi {
753754

754755
/**
755756
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
756-
* Retrieve player by token.
757-
* @param provider OAuth provider
758-
* @param oAuthRequest
757+
* Retrieve player by oauth token.
758+
* @param authenticateOAuthRequest
759759
*/
760-
public verifyOAuthToken(provider: OAuthProvider, oAuthRequest: OAuthRequest, _options?: Configuration): Observable<PlayerResponse> {
761-
const requestContextPromise = this.requestFactory.verifyOAuthToken(provider, oAuthRequest, _options);
760+
public verifyOAuthToken(authenticateOAuthRequest: AuthenticateOAuthRequest, _options?: Configuration): Observable<PlayerResponse> {
761+
const requestContextPromise = this.requestFactory.verifyOAuthToken(authenticateOAuthRequest, _options);
762762

763763
// build promise chain
764764
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -1103,11 +1103,12 @@ export class ObservableAuthenticationApi {
11031103

11041104
/**
11051105
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
1106-
* Retrieve player by oauth token.
1107-
* @param authenticateOAuthRequest
1106+
* Retrieve player by token.
1107+
* @param provider OAuth provider
1108+
* @param oAuthRequest
11081109
*/
1109-
public verifyOAuth(authenticateOAuthRequest: AuthenticateOAuthRequest, _options?: Configuration): Observable<PlayerResponse> {
1110-
const requestContextPromise = this.requestFactory.verifyOAuth(authenticateOAuthRequest, _options);
1110+
public verifyOAuth(provider: OAuthProvider, oAuthRequest: OAuthRequest, _options?: Configuration): Observable<PlayerResponse> {
1111+
const requestContextPromise = this.requestFactory.verifyOAuth(provider, oAuthRequest, _options);
11111112

11121113
// build promise chain
11131114
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
@@ -1127,12 +1128,11 @@ export class ObservableAuthenticationApi {
11271128

11281129
/**
11291130
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
1130-
* Retrieve player by token.
1131-
* @param provider OAuth provider
1132-
* @param oAuthRequest
1131+
* Retrieve player by oauth token.
1132+
* @param authenticateOAuthRequest
11331133
*/
1134-
public verifyOAuthToken(provider: OAuthProvider, oAuthRequest: OAuthRequest, _options?: Configuration): Observable<PlayerResponse> {
1135-
const requestContextPromise = this.requestFactory.verifyOAuthToken(provider, oAuthRequest, _options);
1134+
public verifyOAuthToken(authenticateOAuthRequest: AuthenticateOAuthRequest, _options?: Configuration): Observable<PlayerResponse> {
1135+
const requestContextPromise = this.requestFactory.verifyOAuthToken(authenticateOAuthRequest, _options);
11361136

11371137
// build promise chain
11381138
let middlewarePreObservable = from<RequestContext>(requestContextPromise);

0 commit comments

Comments
 (0)