remove simple to fix warnings
Co-authored-by: Christoph <tobi@urpost.de>
This commit is contained in:
@ -6,15 +6,18 @@ import org.keycloak.adapters.springsecurity.token.KeycloakAuthenticationToken;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class KeyCloakService {
|
||||
public final class KeyCloakService {
|
||||
|
||||
private KeyCloakService() {}
|
||||
|
||||
/**
|
||||
* Creates an Account.
|
||||
*
|
||||
* @param token Ein toller token
|
||||
*
|
||||
* @return Account with current userdata
|
||||
*/
|
||||
public Account createAccountFromPrincipal(KeycloakAuthenticationToken token) {
|
||||
public static Account createAccountFromPrincipal(KeycloakAuthenticationToken token) {
|
||||
KeycloakPrincipal principal = (KeycloakPrincipal) token.getPrincipal();
|
||||
return new Account(
|
||||
principal.getName(),
|
||||
|
||||
Reference in New Issue
Block a user