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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication
org.springframework.security.core.Authentication.Builder<B> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCollection<? extends org.springframework.security.core.GrantedAuthority> getName()booleanvoidsetAuthenticated(boolean isAuthenticated) static voidAllow usage of secured methods such as JpaRepositories as admin, for example on startup or in background tasks.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.core.Authentication
toBuilder
-
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:
getAuthoritiesin interfaceorg.springframework.security.core.Authentication
-
getCredentials
- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication
-
getDetails
- Specified by:
getDetailsin interfaceorg.springframework.security.core.Authentication
-
getPrincipal
- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticatedin interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
- Specified by:
setAuthenticatedin interfaceorg.springframework.security.core.Authentication- Throws:
IllegalArgumentException
-
getName
-