diff --git a/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/ClientDemoRestController.java b/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/ClientDemoRestController.java deleted file mode 100644 index fd6f784e8..000000000 --- a/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/ClientDemoRestController.java +++ /dev/null @@ -1,19 +0,0 @@ -package de.muenchen.oss.wahllokalsystem.basisdatenservice.rest; - -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/demo") -@RequiredArgsConstructor -public class ClientDemoRestController { - - private final DemoClient demoClient; - - @GetMapping - public DemoDTO getDemo() { - return demoClient.getDemo(); - } -} diff --git a/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/DemoClient.java b/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/DemoClient.java deleted file mode 100644 index 2a10352b4..000000000 --- a/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/DemoClient.java +++ /dev/null @@ -1,20 +0,0 @@ -package de.muenchen.oss.wahllokalsystem.basisdatenservice.rest; - -import de.muenchen.oss.wahllokalsystem.basisdatenservice.eai.aou.client.WahlvorschlagControllerApi; -import lombok.RequiredArgsConstructor; -import lombok.val; -import org.springframework.stereotype.Component; - -@Component -@RequiredArgsConstructor -public class DemoClient { - - private final WahlvorschlagControllerApi wahlvorschlagControllerApi; - - public DemoDTO getDemo() { - val wahlvorschlaege = wahlvorschlagControllerApi.loadWahlvorschlaege("wahlID", "wahlbezirkID"); - - return new DemoDTO(wahlvorschlaege.getStimmzettelgebietID(), "" + wahlvorschlaege.getWahlvorschlaege().size()); - } - -} diff --git a/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/DemoDTO.java b/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/DemoDTO.java deleted file mode 100644 index 8504b0a8d..000000000 --- a/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/rest/DemoDTO.java +++ /dev/null @@ -1,4 +0,0 @@ -package de.muenchen.oss.wahllokalsystem.basisdatenservice.rest; - -public record DemoDTO(String demoString1, String demoString) { -} diff --git a/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/security/AuthoritiesEnum.java b/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/security/AuthoritiesEnum.java deleted file mode 100644 index 0202f7bc6..000000000 --- a/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/security/AuthoritiesEnum.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c): it@M - Dienstleister für Informations- und Telekommunikationstechnik - * der Landeshauptstadt München, 2024 - */ -package de.muenchen.oss.wahllokalsystem.basisdatenservice.security; - -import org.springframework.data.repository.PagingAndSortingRepository; -import org.springframework.security.access.prepost.PreAuthorize; - -/** - * Each possible authority in this project is represented by an enum. The enums are used within the - * {@link PagingAndSortingRepository} in the annotation e.g. - * {@link PreAuthorize}. - */ -public enum AuthoritiesEnum { - WLS_BASISDATEN_SERVICE_READ_THEENTITY, WLS_BASISDATEN_SERVICE_WRITE_THEENTITY, WLS_BASISDATEN_SERVICE_DELETE_THEENTITY, - // add your authorities here and also add these new authorities to sso-authorisation.json. - -} diff --git a/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/TestConstants.java b/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/TestConstants.java index be39858e8..6e97356b1 100644 --- a/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/TestConstants.java +++ b/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/TestConstants.java @@ -5,12 +5,7 @@ package de.muenchen.oss.wahllokalsystem.basisdatenservice; import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.Getter; import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; -import org.springframework.hateoas.RepresentationModel; @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class TestConstants { @@ -19,15 +14,4 @@ public final class TestConstants { public static final String SPRING_NO_SECURITY_PROFILE = "no-security"; - @NoArgsConstructor - @Getter - @Setter - @EqualsAndHashCode(callSuper = true) - @ToString(callSuper = true) - public static class TheEntityDto extends RepresentationModel { - - private String textAttribute; - - } - } diff --git a/wls-basisdaten-service/src/test/resources/demo.http b/wls-basisdaten-service/src/test/resources/demo.http deleted file mode 100644 index ebca281b3..000000000 --- a/wls-basisdaten-service/src/test/resources/demo.http +++ /dev/null @@ -1,22 +0,0 @@ -### get token for wls_all -POST http://kubernetes.docker.internal:8100/auth/realms/wls_realm/protocol/openid-connect/token -Content-Type: application/x-www-form-urlencoded - -password = test & -grant_type = password & -client_secret = top-secret & -client_id = wls & -username = wls_all - -> {% - client.global.set("auth_token", response.body.access_token); - client.global.set("token_type", response.body.token_type); -%} - -### get userinfo with auth_token -GET http://kubernetes.docker.internal:8100/auth/realms/wls_realm/protocol/openid-connect/userinfo -Authorization: {{ token_type }} {{ auth_token }} - -### Demo für client zu EAI - will result in 500 als long as eai is not implemented (not implemented yet) -GET http://localhost:39151/demo -Authorization: {{ token_type }} {{ auth_token }} \ No newline at end of file