Class SecurityContextService
- java.lang.Object
-
- com.netgrif.application.engine.security.service.SecurityContextService
-
- All Implemented Interfaces:
ISecurityContextService
@Service public class SecurityContextService extends java.lang.Object implements ISecurityContextService
Service for managing security context object, like user resource
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSecurityContextService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAuthenticatedPrincipalLoggedUser()Checks type of SecurityContextvoidreloadSecurityContext(LoggedUser loggedUser)Reloads the security context according to currently logged uservoidsaveToken(java.lang.String token)Saves token to the cache if the state of context object was changed and needs to be updated
-
-
-
Method Detail
-
saveToken
public void saveToken(java.lang.String token)
Saves token to the cache if the state of context object was changed and needs to be updated- Specified by:
saveTokenin interfaceISecurityContextService- Parameters:
token- the token string to be cached
-
reloadSecurityContext
public void reloadSecurityContext(LoggedUser loggedUser)
Reloads the security context according to currently logged user- Specified by:
reloadSecurityContextin interfaceISecurityContextService- Parameters:
loggedUser- the user whose context needs to be reloaded
-
isAuthenticatedPrincipalLoggedUser
public boolean isAuthenticatedPrincipalLoggedUser()
Checks type of SecurityContext- Specified by:
isAuthenticatedPrincipalLoggedUserin interfaceISecurityContextService- Returns:
- true if the SecurityContext exists and is of type LoggedUser
-
-