Compare commits
No commits in common. "main" and "0.6.0" have entirely different histories.
@ -119,18 +119,16 @@ public class SpringDocConfiguration {
|
||||
|
||||
private OAuthFlows createOAuthFlows(SpringDocProperties springDocProperties) {
|
||||
|
||||
var codeFlow = new OAuthFlow().authorizationUrl(springDocProperties.getAuthServerUrl() + PROTOCOL_URL_FORMAT + "/auth")
|
||||
OAuthFlow flow = createAuthorizationCodeFlow(springDocProperties);
|
||||
|
||||
return new OAuthFlows().authorizationCode(flow);
|
||||
}
|
||||
|
||||
|
||||
private OAuthFlow createAuthorizationCodeFlow(SpringDocProperties springDocProperties) {
|
||||
|
||||
return new OAuthFlow().authorizationUrl(springDocProperties.getAuthServerUrl() + PROTOCOL_URL_FORMAT + "/auth")
|
||||
.tokenUrl(springDocProperties.getAuthServerUrl() + PROTOCOL_URL_FORMAT + "/token");
|
||||
|
||||
var flows = new OAuthFlows().authorizationCode(codeFlow);
|
||||
|
||||
if (springDocProperties.isShowImplicitFlow()) {
|
||||
var implicitFlow = new OAuthFlow().authorizationUrl(springDocProperties.getAuthServerUrl() + PROTOCOL_URL_FORMAT + "/auth")
|
||||
.tokenUrl(springDocProperties.getAuthServerUrl() + PROTOCOL_URL_FORMAT + "/token");
|
||||
flows.implicit(implicitFlow);
|
||||
}
|
||||
|
||||
return flows;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -23,7 +23,6 @@ public class SpringDocProperties {
|
||||
private String title ="Service Open API Documentation";
|
||||
private String description ="Service Open API Documentation";
|
||||
private String version = "1.0";
|
||||
private boolean showImplicitFlow = true;
|
||||
|
||||
private List<String> packagesToScan = new ArrayList<>();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user