forked from loafle/openapi-generator-original
update samples
This commit is contained in:
parent
c1c5775271
commit
4d0a40e982
@ -123,6 +123,16 @@ public class ApiClient {
|
|||||||
return objectMapper;
|
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(){
|
public ObjectMapper getObjectMapper(){
|
||||||
return objectMapper;
|
return objectMapper;
|
||||||
|
@ -130,6 +130,16 @@ public class ApiClient {
|
|||||||
return objectMapper;
|
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(){
|
public ObjectMapper getObjectMapper(){
|
||||||
return objectMapper;
|
return objectMapper;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user