org.romaframework.module.users
Class UsersAuthentication
java.lang.Object
org.romaframework.core.config.Configurable<T>
org.romaframework.core.module.SelfRegistrantConfigurableModule<java.lang.String>
org.romaframework.aspect.authentication.AuthenticationAspectAbstract
org.romaframework.module.users.UsersAuthentication
- All Implemented Interfaces:
- org.romaframework.aspect.authentication.AuthenticationAspect, org.romaframework.aspect.authentication.UserObjectPermissionListener, org.romaframework.aspect.session.SessionListener, org.romaframework.core.aspect.Aspect, org.romaframework.core.config.Serviceable, org.romaframework.core.flow.SchemaFieldListener, org.romaframework.core.module.Module
- Direct Known Subclasses:
- LdapAuthentication
public class UsersAuthentication
- extends org.romaframework.aspect.authentication.AuthenticationAspectAbstract
- implements org.romaframework.aspect.authentication.UserObjectPermissionListener, org.romaframework.aspect.session.SessionListener, org.romaframework.core.flow.SchemaFieldListener
| Nested classes/interfaces inherited from interface org.romaframework.core.flow.SchemaFieldListener |
org.romaframework.core.flow.SchemaFieldListener.IgnoredExecution |
| Fields inherited from class org.romaframework.aspect.authentication.AuthenticationAspectAbstract |
DEF_ALGORITHM |
| Fields inherited from class org.romaframework.core.config.Configurable |
DEFAULT_CONFIG |
| Fields inherited from interface org.romaframework.core.flow.SchemaFieldListener |
IGNORED |
| Fields inherited from interface org.romaframework.aspect.authentication.AuthenticationAspect |
ASPECT_NAME |
| Fields inherited from interface org.romaframework.core.config.Serviceable |
STATUS_DOWN, STATUS_SHUTDOWNING, STATUS_STARTING, STATUS_UNKNOWN, STATUS_UP |
|
Method Summary |
boolean |
allow(java.lang.Object iProfile,
java.lang.String iFunctionName)
Implement the algorithm that check if a function is allowed for a user profile. |
boolean |
allowAction(org.romaframework.core.schema.SchemaAction iAction)
|
boolean |
allowClass(org.romaframework.core.schema.SchemaClass iClass)
|
boolean |
allowEvent(org.romaframework.core.schema.SchemaEvent iEvent)
|
boolean |
allowField(org.romaframework.core.schema.SchemaField iField)
|
java.lang.Object |
authenticate(java.lang.String iUserName,
java.lang.String iUserPasswd,
java.util.Map<java.lang.String,java.lang.String> iParameters)
|
boolean |
checkPassword(java.lang.String iPassword,
java.lang.String iPasswordToCheck)
|
BaseProfile |
getCurrentProfile()
|
boolean |
isSingleSessionPerUser()
|
void |
logout()
|
java.lang.Object |
onAfterFieldRead(java.lang.Object iContent,
org.romaframework.core.schema.SchemaField iField,
java.lang.Object iCurrentValue)
|
java.lang.Object |
onAfterFieldWrite(java.lang.Object iContent,
org.romaframework.core.schema.SchemaField iField,
java.lang.Object iCurrentValue)
|
java.lang.Object |
onBeforeFieldRead(java.lang.Object iContent,
org.romaframework.core.schema.SchemaField iField,
java.lang.Object iCurrentValue)
|
java.lang.Object |
onBeforeFieldWrite(java.lang.Object iContent,
org.romaframework.core.schema.SchemaField iField,
java.lang.Object iCurrentValue)
|
void |
onSessionCreating(org.romaframework.aspect.session.SessionInfo iSession)
|
void |
onSessionDestroying(org.romaframework.aspect.session.SessionInfo iSession)
|
void |
setSingleSessionPerUser(boolean singleSessionPerUser)
|
void |
startup()
|
| Methods inherited from class org.romaframework.aspect.authentication.AuthenticationAspectAbstract |
aspectName, beginConfigClass, configAction, configClass, configEvent, configField, encryptPassword, encryptPasswordInBytes, endConfigClass, getCurrentAccount, getEncryptionAlgorithm, getUnderlyingComponent, setEncryptionAlgorithm |
| Methods inherited from class org.romaframework.core.module.SelfRegistrantConfigurableModule |
getStatus, moduleName, showConfiguration, shutdown |
| Methods inherited from class org.romaframework.core.config.Configurable |
addConfiguration, addConfiguration, getConfiguration, getConfigurationValues, setConfiguration |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ANONYMOUS_PROFILE_NAME
public static final java.lang.String ANONYMOUS_PROFILE_NAME
- See Also:
- Constant Field Values
PAR_ALGORITHM
public static final java.lang.String PAR_ALGORITHM
- See Also:
- Constant Field Values
UsersAuthentication
public UsersAuthentication()
authenticate
public java.lang.Object authenticate(java.lang.String iUserName,
java.lang.String iUserPasswd,
java.util.Map<java.lang.String,java.lang.String> iParameters)
throws org.romaframework.aspect.authentication.AuthenticationException
- Specified by:
authenticate in interface org.romaframework.aspect.authentication.AuthenticationAspect
- Throws:
org.romaframework.aspect.authentication.AuthenticationException
checkPassword
public boolean checkPassword(java.lang.String iPassword,
java.lang.String iPasswordToCheck)
throws java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchAlgorithmException
allow
public boolean allow(java.lang.Object iProfile,
java.lang.String iFunctionName)
- Implement the algorithm that check if a function is allowed for a user profile. It get the user's profile and go up until the
root.
- Specified by:
allow in interface org.romaframework.aspect.authentication.AuthenticationAspect
logout
public void logout()
throws org.romaframework.aspect.authentication.AuthenticationException
- Specified by:
logout in interface org.romaframework.aspect.authentication.AuthenticationAspect
- Throws:
org.romaframework.aspect.authentication.AuthenticationException
allowClass
public boolean allowClass(org.romaframework.core.schema.SchemaClass iClass)
- Specified by:
allowClass in interface org.romaframework.aspect.authentication.UserObjectPermissionListener
allowField
public boolean allowField(org.romaframework.core.schema.SchemaField iField)
- Specified by:
allowField in interface org.romaframework.aspect.authentication.UserObjectPermissionListener
allowAction
public boolean allowAction(org.romaframework.core.schema.SchemaAction iAction)
- Specified by:
allowAction in interface org.romaframework.aspect.authentication.UserObjectPermissionListener
allowEvent
public boolean allowEvent(org.romaframework.core.schema.SchemaEvent iEvent)
- Specified by:
allowEvent in interface org.romaframework.aspect.authentication.UserObjectPermissionListener
getCurrentProfile
public BaseProfile getCurrentProfile()
- Specified by:
getCurrentProfile in interface org.romaframework.aspect.authentication.AuthenticationAspect
onSessionCreating
public void onSessionCreating(org.romaframework.aspect.session.SessionInfo iSession)
- Specified by:
onSessionCreating in interface org.romaframework.aspect.session.SessionListener
onSessionDestroying
public void onSessionDestroying(org.romaframework.aspect.session.SessionInfo iSession)
- Specified by:
onSessionDestroying in interface org.romaframework.aspect.session.SessionListener
startup
public void startup()
- Specified by:
startup in interface org.romaframework.core.config.Serviceable- Overrides:
startup in class org.romaframework.aspect.authentication.AuthenticationAspectAbstract
isSingleSessionPerUser
public boolean isSingleSessionPerUser()
setSingleSessionPerUser
public void setSingleSessionPerUser(boolean singleSessionPerUser)
onAfterFieldRead
public java.lang.Object onAfterFieldRead(java.lang.Object iContent,
org.romaframework.core.schema.SchemaField iField,
java.lang.Object iCurrentValue)
- Specified by:
onAfterFieldRead in interface org.romaframework.core.flow.SchemaFieldListener
onAfterFieldWrite
public java.lang.Object onAfterFieldWrite(java.lang.Object iContent,
org.romaframework.core.schema.SchemaField iField,
java.lang.Object iCurrentValue)
- Specified by:
onAfterFieldWrite in interface org.romaframework.core.flow.SchemaFieldListener
onBeforeFieldRead
public java.lang.Object onBeforeFieldRead(java.lang.Object iContent,
org.romaframework.core.schema.SchemaField iField,
java.lang.Object iCurrentValue)
- Specified by:
onBeforeFieldRead in interface org.romaframework.core.flow.SchemaFieldListener
onBeforeFieldWrite
public java.lang.Object onBeforeFieldWrite(java.lang.Object iContent,
org.romaframework.core.schema.SchemaField iField,
java.lang.Object iCurrentValue)
- Specified by:
onBeforeFieldWrite in interface org.romaframework.core.flow.SchemaFieldListener