Skip to content

Commit ede2a23

Browse files
[JAVA][Feign] Replace Apache oltu with scribejava (#8318)
* - Replace apache oltu with scribejava - Implement the following authentication methods - ApiKey header - HTTP basic authentication - Oauth client credentials flow - Oauth Implicit flow - Oauth Pasword (deprecated) * Create class hierarchy for Oauth flows implementation * Add instructions of how to use the ApiClient to Readme.md * Update samples * Remove support for java 6 and 7 * Remove java 6 and 7 support from gradle * Format pom.xml * Remove empty line * Update samples * Remove oltu dependency from build.gradle and build.sbt. Replace oltu with ScribeJava Update samples * Update samples * Update samples
1 parent 6e4c130 commit ede2a23

43 files changed

Lines changed: 1199 additions & 1202 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/openapi-generator-gradle-plugin/gradlew.bat

Lines changed: 100 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,10 @@ public void processOpts() {
392392
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);
393393
supportingFiles.add(new SupportingFile("ParamExpander.mustache", invokerFolder, "ParamExpander.java"));
394394
supportingFiles.add(new SupportingFile("EncodingUtils.mustache", invokerFolder, "EncodingUtils.java"));
395+
supportingFiles.add(new SupportingFile("auth/DefaultApi20Impl.mustache", authFolder, "DefaultApi20Impl.java"));
396+
supportingFiles.add(new SupportingFile("auth/OauthPasswordGrant.mustache", authFolder, "OauthPasswordGrant.java"));
397+
supportingFiles.add(new SupportingFile("auth/OauthClientCredentialsGrant.mustache", authFolder, "OauthClientCredentialsGrant.java"));
398+
395399
} else if (OKHTTP_GSON.equals(getLibrary()) || StringUtils.isEmpty(getLibrary())) {
396400
// the "okhttp-gson" library template requires "ApiCallback.mustache" for async call
397401
supportingFiles.add(new SupportingFile("ApiCallback.mustache", invokerFolder, "ApiCallback.java"));

modules/openapi-generator/src/main/resources/Java/auth/OAuthFlow.mustache

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
package {{invokerPackage}}.auth;
44

5+
{{>generatedAnnotation}}
56
public enum OAuthFlow {
6-
accessCode, implicit, password, application
7+
accessCode, //called authorizationCode in OpenAPI 3.0
8+
implicit,
9+
password,
10+
application //called clientCredentials in OpenAPI 3.0
711
}

0 commit comments

Comments
 (0)