U - user typepublic interface ServiceAuthentication<U>
ServiceAuthenticationAbstract
This service is used in AbstractAuthenticationFilter to verify
user rights for displaying pages using isAllowed(Class) method.
See documentation site for more explanation of using this service and
authentication managment.
public ServiceAuthenticationContribute to ApplicationStateManager to instantiate MyUser automatically :buildServiceAuthentication( ApplicationStateManager stateManager) { ServiceAuthentication instance = new ServiceAuthenticationImpl(stateManager); return instance; }
public void contributeApplicationStateManager(
MappedConfiguration,
ApplicationStateContribution> configuration,
final ServiceAuthentication serviceAuthentication) {
ApplicationStateCreator creator =
new ApplicationStateCreator() {
| Modifier and Type | Method and Description |
|---|---|
U |
getNewUserInstance()
Create a new instance of user.
|
U |
getUserConnected()
Get the current user connected.
|
boolean |
isAllowed(Class<?> page)
Check if the current user is allowed to display this
page. |
boolean |
isUserConnected()
Detect if user is connected.
|
void |
setUserConnected(U user)
Set the connected user to
user. |
boolean isUserConnected()
U getUserConnected()
void setUserConnected(U user)
user.user - that will be connectedboolean isAllowed(Class<?> page)
page.page - to checkU getNewUserInstance()
Copyright © 2010-2013 CodeLutin. All Rights Reserved.