forked from loafle/openapi-generator-original
[Java] [Kotlin] (#14876) fix use of isBasic conditions - do not use HttpBearerAuth (or HttpBasicAuth) for other http auth methods (such as http signature auth or custom schemes) (#15220)
* remove http signature from test yaml when not supported * do not use HttpBearerAuth for signature auth or other unsupported http auth method ignore unsupported http auth method unless generated code would not compile (in which case, an exception is thrown) * [Java] fix use of isBasic condition * [kotlin] fix use of isBasic condition
This commit is contained in:
@@ -243,13 +243,13 @@ Authentication schemes defined for the API:
|
||||
### bearer_test
|
||||
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
- **Type**: HTTP Bearer Token authentication (JWT)
|
||||
|
||||
<a id="http_signature_test"></a>
|
||||
### http_signature_test
|
||||
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
- **Type**: HTTP signature authentication
|
||||
|
||||
|
||||
## Recommendation
|
||||
|
||||
@@ -179,7 +179,6 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
||||
authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
authentications.put("bearer_test", new HttpBearerAuth("bearer"));
|
||||
authentications.put("http_signature_test", new HttpBearerAuth("signature"));
|
||||
// Prevent the authentications from being modified.
|
||||
authentications = Collections.unmodifiableMap(authentications);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user