Package ch.tocco.nice2.security.api
Interface SecurityContext
- All Known Implementing Classes:
SecurityContextImpl
public interface SecurityContext
The security context of the current principal and factory for
Guard
s.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Returns aGuard
for exactly one client.getGuardForList
(List<?> clients) @Nullable UUID
@Nullable Node
prepareCondition
(Node condition)
-
Method Details
-
getPrincipal
Principal getPrincipal()- Returns:
- The principal, may be anonymous.
-
getSessionId
-
getGuard
Returns aGuard
for exactly one client.- Parameters:
client
- For example an Entity or an EntityManager.
-
getGuardForList
- Returns:
- A
ListGuard
for efficiently evaluating permissions of multiple objects of the same type.
-
getPolicy
Policy getPolicy()- Returns:
- the unfiltered policy contained in this SecurityContext
-
prepareCondition
- Throws:
EvaluationException
-
destroy
void destroy()
-