RED-4515: Changed swagger back to authorizationCode flow
This commit is contained in:
parent
09291ea39d
commit
1a41edbef9
@ -5,8 +5,6 @@ import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.keycloak.adapters.springboot.KeycloakSpringBootProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties;
|
||||
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties;
|
||||
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementPortType;
|
||||
@ -119,7 +117,7 @@ public class SwaggerAutoConfiguration {
|
||||
|
||||
OAuthFlow flow = createAuthorizationCodeFlow();
|
||||
|
||||
return new OAuthFlows().implicit(flow);
|
||||
return new OAuthFlows().authorizationCode(flow);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -222,8 +222,19 @@ public class TenantManagementService {
|
||||
redactionClient.setImplicitFlowEnabled(true);
|
||||
redactionClient.setDirectAccessGrantsEnabled(true);
|
||||
|
||||
var swaggerClient = new ClientRepresentation();
|
||||
swaggerClient.setEnabled(true);
|
||||
swaggerClient.setName("swagger-ui-client");
|
||||
swaggerClient.setClientId("swagger-ui-client");
|
||||
swaggerClient.setStandardFlowEnabled(true);
|
||||
swaggerClient.setImplicitFlowEnabled(false);
|
||||
swaggerClient.setDirectAccessGrantsEnabled(false);
|
||||
swaggerClient.setServiceAccountsEnabled(true);
|
||||
swaggerClient.setAuthorizationServicesEnabled(true);
|
||||
swaggerClient.setSecret("OsloImWinter!23");
|
||||
|
||||
redaction.setClients(List.of(redactionClient));
|
||||
|
||||
redaction.setClients(List.of(redactionClient, swaggerClient));
|
||||
var redUserRole = new RoleRepresentation();
|
||||
redUserRole.setComposite(true);
|
||||
redUserRole.setName(RED_USER_ROLE);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user