forked from loafle/openapi-generator-original
[Java] fix runtime exception when there are multiple auth methods (#5530)
* fix runtime exception when there are multiple auth methods * Refactor a bit so that it does not cause conflict with relative url token branch
This commit is contained in:
@@ -143,6 +143,10 @@ public class ApiClient {
|
||||
retryingOAuth
|
||||
);
|
||||
initHttpClient(Collections.<Interceptor>singletonList(retryingOAuth));
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
||||
authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
|
||||
// Prevent the authentications from being modified.
|
||||
authentications = Collections.unmodifiableMap(authentications);
|
||||
|
||||
Reference in New Issue
Block a user