ImpersonatedUserHolder
Used by the framework’s default implementation of UserService to allow the current user to be temporarily impersonated.
The intention is that viewers provide an implementation of this service. Note that the Wicket viewer does implement this service and uses an javax.servlet.http.HttpSession ; this will have the side-effect
API
ImpersonatedUserHolder.java
interface ImpersonatedUserHolder {
boolean supportsImpersonation() (1)
void setUserMemento(UserMemento userMemento) (2)
Optional<UserMemento> getUserMemento()
void clearUserMemento()
}
1 | supportsImpersonation()
Whether or not this implementation supports impersonation. |
2 | setUserMemento(UserMemento)
Sets the user memento to be impersonated. |