Skip to content

Commit 1adc962

Browse files
davidwcarlsonwing328
authored andcommitted
java-jersey2 - Always render setBearerToken regardless of whether OAuth2 is in use. (#2479)
1 parent 94c267e commit 1adc962

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ public class ApiClient {
194194
throw new RuntimeException("No API key authentication configured!");
195195
}
196196

197-
{{#hasOAuthMethods}}
198197
/**
199198
* Helper method to set bearer token for the first Bearer authentication.
200199
* @param bearerToken Bearer token
@@ -209,6 +208,7 @@ public class ApiClient {
209208
throw new RuntimeException("No Bearer authentication configured!");
210209
}
211210

211+
{{#hasOAuthMethods}}
212212
/**
213213
* Helper method to set access token for the first OAuth2 authentication.
214214
* @param accessToken Access token

0 commit comments

Comments
 (0)