style: Remove unnecessary blank lines and improve type safety
This commit is contained in:
parent
e5d0bcb84e
commit
54a76de08c
1 changed files with 2 additions and 4 deletions
|
@ -1,7 +1,5 @@
|
||||||
package de.szut.lf8_starter.welcome;
|
package de.szut.lf8_starter.welcome;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
@ -19,8 +17,8 @@ public class WelcomeController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/roles")
|
@GetMapping("/roles")
|
||||||
public ResponseEntity getRoles(Authentication authentication) {
|
public ResponseEntity<Collection<GrantedAuthority>> getRoles(Authentication authentication) {
|
||||||
return ResponseEntity.ok(authentication.getAuthorities());
|
return ResponseEntity.ok((Collection<GrantedAuthority>) authentication.getAuthorities());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue