Package ome.security.basic
Interface PrincipalHolder
-
- All Known Implementing Classes:
CurrentDetails
public interface PrincipalHolderStack of activePrincipalinstances. As a user logs in, an empty context is created which must later be primed by theSecuritySystemin order to be operational.- See Also:
BasicSecuritySystem
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ome.system.PrincipalgetLast()Get the last, i.e.voidlogin(BasicEventContext bec)Allow logging in directly with an event context.voidlogin(ome.system.Principal principal)Add a new principal context to the stack.intlogout()Pop the last created principal context and return the number of active contexts remaining.intsize()Get the number of active principal contexts.
-
-
-
Method Detail
-
size
int size()
Get the number of active principal contexts.- Returns:
- the number of active principals
-
getLast
ome.system.Principal getLast()
Get the last, i.e. currently active, principal.- Returns:
- the current principal
-
login
void login(ome.system.Principal principal)
Add a new principal context to the stack.- Parameters:
principal- the principal to add
-
login
void login(BasicEventContext bec)
Allow logging in directly with an event context.- Parameters:
bec- the event context to use
-
logout
int logout()
Pop the last created principal context and return the number of active contexts remaining.- Returns:
- the number of active principals after the logout
-
-