Package nl.b3p.tailormap.api.security
Class InternalAdminAuthentication
- java.lang.Object
-
- nl.b3p.tailormap.api.security.InternalAdminAuthentication
-
- All Implemented Interfaces:
Serializable,Principal,org.springframework.security.core.Authentication
public class InternalAdminAuthentication extends Object implements org.springframework.security.core.Authentication
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static InternalAdminAuthenticationINSTANCE
-
Constructor Summary
Constructors Constructor Description InternalAdminAuthentication()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidclearSecurityContextAuthentication()Collection<? extends org.springframework.security.core.GrantedAuthority>getAuthorities()ObjectgetCredentials()ObjectgetDetails()StringgetName()ObjectgetPrincipal()booleanisAuthenticated()voidsetAuthenticated(boolean isAuthenticated)static voidsetInSecurityContext()Allow usage of secured methods such as JpaRepositories as admin, for example on startup or in background tasks.
-
-
-
Field Detail
-
INSTANCE
public static final InternalAdminAuthentication INSTANCE
-
-
Method Detail
-
setInSecurityContext
public static void setInSecurityContext()
Allow usage of secured methods such as JpaRepositories as admin, for example on startup or in background tasks.
-
clearSecurityContextAuthentication
public static void clearSecurityContextAuthentication()
-
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
- Specified by:
getAuthoritiesin interfaceorg.springframework.security.core.Authentication
-
getCredentials
public Object getCredentials()
- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication
-
getDetails
public Object getDetails()
- Specified by:
getDetailsin interfaceorg.springframework.security.core.Authentication
-
getPrincipal
public Object getPrincipal()
- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()
- Specified by:
isAuthenticatedin interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException- Specified by:
setAuthenticatedin interfaceorg.springframework.security.core.Authentication- Throws:
IllegalArgumentException
-
-