Package org.tailormap.api.security
Class InternalAdminAuthentication
java.lang.Object
org.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:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Collection<? extends org.springframework.security.core.GrantedAuthority>
getName()
boolean
void
setAuthenticated
(boolean isAuthenticated) static void
Allow usage of secured methods such as JpaRepositories as admin, for example on startup or in background tasks.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
InternalAdminAuthentication
public InternalAdminAuthentication()
-
-
Method Details
-
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
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.Authentication
-
getCredentials
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
-
getDetails
- Specified by:
getDetails
in interfaceorg.springframework.security.core.Authentication
-
getPrincipal
- Specified by:
getPrincipal
in interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticated
in interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
- Specified by:
setAuthenticated
in interfaceorg.springframework.security.core.Authentication
- Throws:
IllegalArgumentException
-
getName
-