Skip to content

Commit

Permalink
Fixed auth servers in test console on switching apis (#2471)
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrik authored Apr 23, 2024
1 parent 63975bc commit 04e202d
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,13 @@ export class OperationDetails {
let associatedAuthServers: AuthorizationServer[];
if (api.authenticationSettings?.oAuth2AuthenticationSettings?.length > 0) {
associatedAuthServers = await this.oauthService.getOauthServers(api.id);
}
}
else if (api.authenticationSettings?.openidAuthenticationSettings?.length > 0) {
associatedAuthServers = await this.oauthService.getOpenIdAuthServers(api.id);
}

if (associatedAuthServers) {
this.apiDocumentationAuthServers(associatedAuthServers.filter(a => a.useInApiDocumentation));
this.testConsoleAuthServers(associatedAuthServers.filter(a => a.useInTestConsole));
}
this.apiDocumentationAuthServers(associatedAuthServers ? associatedAuthServers.filter(a => a.useInApiDocumentation) : []);
this.testConsoleAuthServers(associatedAuthServers ? associatedAuthServers.filter(a => a.useInTestConsole) : []);
}

public async loadOperation(apiName: string, operationName: string): Promise<void> {
Expand Down

0 comments on commit 04e202d

Please sign in to comment.