Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 3e115afd authored by Jean Claude Correale's avatar Jean Claude Correale
Browse files

Remove participant type enum

parent 64cb9c0f
No related branches found
No related tags found
4 merge requests!130Release,!129Release,!128fix unit tests - add property,!115Remove participant type enum
Pipeline #224045 failed
......@@ -2,7 +2,7 @@ package com.aruba.simpl.usersroles.configurations;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "microservices")
@ConfigurationProperties(prefix = "microservice")
public record MicroserviceProperties(IdentityProvider identityProvider) {
public record IdentityProvider(String url) {}
......
......@@ -10,7 +10,6 @@ import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody;
......@@ -54,7 +53,6 @@ public class CredentialController implements CredentialExchange {
return service.insert(file);
}
@GetMapping
@Operation(
summary = "Check if a credential is present",
description = "Returns true if a credential is present, false otherwise",
......@@ -71,12 +69,11 @@ public class CredentialController implements CredentialExchange {
description = "Boolean indicating if a credential is present",
type = "boolean")))
})
@Override
public boolean hasCredential() {
return service.hasCredential();
}
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping
@Operation(
summary = "Delete the credential",
description = "Deletes the existing credential from the server",
......@@ -84,6 +81,7 @@ public class CredentialController implements CredentialExchange {
@ApiResponse(responseCode = "204", description = "Successfully deleted credential"),
@ApiResponse(responseCode = "404", description = "Credential not found")
})
@Override
public void delete() {
service.deleteCredential();
}
......
......@@ -31,4 +31,8 @@ client:
url: https://tls.authority.aruba-simpl.cloud
server:
port: 8081
\ No newline at end of file
port: 8081
microservice:
identity-provider:
url: [IDENTITY_PROVIDER_URL]
......@@ -44,4 +44,8 @@ client:
type: FEIGN
certificate-password: [CLIENT_CERTIFICATE_PASSWORD]
authority:
url: [CLIENT_AUTHORITY_URL]
\ No newline at end of file
url: [CLIENT_AUTHORITY_URL]
microservice:
identity-provider:
url: "http://localhost:8083"
\ No newline at end of file
......@@ -3,7 +3,6 @@ package com.aruba.simpl.usersroles.services.impl;
import static org.assertj.core.api.Assertions.assertThat;
import com.aruba.simpl.common.model.dto.IdentityAttributeDTO;
import com.aruba.simpl.common.model.enums.ParticipantType;
import com.aruba.simpl.usersroles.model.entities.IdentityAttributeWithOwnership;
import com.aruba.simpl.usersroles.model.mappers.IdentityAttributeWithOwnershipMapper;
import java.util.HashSet;
......@@ -114,7 +113,7 @@ class IdentityAttributeUpdateHelperTest {
.setAssignableToRoles(true)
.setEnabled(true)
.setAssignedToParticipant(assigned)
.setParticipantTypes(new HashSet<>(Set.of(ParticipantType.CONSUMER.name())));
.setParticipantTypes(new HashSet<>(Set.of("CONSUMER")));
}
private IdentityAttributeDTO idaDTO(String label, Consumer<IdentityAttributeDTO> customizer) {
......@@ -124,7 +123,7 @@ class IdentityAttributeUpdateHelperTest {
.setDescription(label)
.setAssignableToRoles(true)
.setEnabled(true)
.setParticipantTypes(new HashSet<>(Set.of(ParticipantType.CONSUMER.name())));
.setParticipantTypes(new HashSet<>(Set.of("CONSUMER")));
customizer.accept(dto);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment