mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-22 09:30:02 +00:00
update samples
This commit is contained in:
@@ -130,6 +130,16 @@ public class ApiClient {
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
private RequestInterceptor buildOauthRequestInterceptor(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) {
|
||||
switch (flow) {
|
||||
case password:
|
||||
return new OauthPasswordGrant(tokenUrl, scopes);
|
||||
case application:
|
||||
return new OauthClientCredentialsGrant(authorizationUrl, tokenUrl, scopes);
|
||||
default:
|
||||
throw new RuntimeException("Oauth flow \"" + flow + "\" is not implemented");
|
||||
}
|
||||
}
|
||||
|
||||
public ObjectMapper getObjectMapper(){
|
||||
return objectMapper;
|
||||
|
||||
Reference in New Issue
Block a user