diff --git a/src/main/java/de/szut/lf8_starter/welcome/WelcomeController.java b/src/main/java/de/szut/lf8_starter/welcome/WelcomeController.java index 6ed067b..a565f3f 100644 --- a/src/main/java/de/szut/lf8_starter/welcome/WelcomeController.java +++ b/src/main/java/de/szut/lf8_starter/welcome/WelcomeController.java @@ -3,12 +3,12 @@ package de.szut.lf8_starter.welcome; import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import java.security.Principal; +import java.util.Collection; @RestController public class WelcomeController { @@ -19,7 +19,7 @@ public class WelcomeController { } @GetMapping("/roles") - public ResponseEntity getRoles(Authentication authentication) { + public ResponseEntity> getRoles(Authentication authentication) { return ResponseEntity.ok(authentication.getAuthorities()); }