|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
U - user typepublic interface ServiceAuthentication<U>
This service is used to provide authentication managment for a final
application. The user type used in the application is needed. This service
need to be implemented and build in the AppModule of your application.
An abstract implementation is available 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() {
- Author:
- fdesbois
$Id: ServiceAuthentication.java 4 2010-05-04 14:54:59Z fdesbois $
Method Summary
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.
Method Detail
isUserConnected
boolean isUserConnected()
- Detect if user is connected.
- Returns:
- true if the user is connected, false otherwise.
getUserConnected
U getUserConnected()
- Get the current user connected.
- Returns:
- the user connected
setUserConnected
void setUserConnected(U user)
- Set the connected user to
user.
- Parameters:
user - that will be connected
isAllowed
boolean isAllowed(Class<?> page)
- Check if the current user is allowed to display this
page.
- Parameters:
page - to check
- Returns:
- true if the connected user is allowed, false otherwise
getNewUserInstance
U getNewUserInstance()
- Create a new instance of user.
- Returns:
- a new user.
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2010 CodeLutin. All Rights Reserved.