org.ow2.bonita.identity.auth
Class PropertiesBasedAuthenticationService
java.lang.Object
org.ow2.bonita.identity.auth.PropertiesBasedAuthenticationService
- All Implemented Interfaces:
- AuthenticationServiceOp
public class PropertiesBasedAuthenticationService
- extends java.lang.Object
- implements AuthenticationServiceOp
AuthenticationServiceOp
implementation that uses specific properties
stored in an IdentityServiceOp
for authentication purpose.
- Author:
- "Pierre Vigneras"
- See Also:
authenticateUser(String...)
Field Summary |
static java.lang.String |
NAME_KEY
Property key for which the user name is supposed to be stored in
IdentityServiceOp UserOp. |
static java.lang.String |
PASSWORD_KEY
Property key for which the password is supposed to be stored in
IdentityServiceOp UserOp. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME_KEY
public static final java.lang.String NAME_KEY
- Property key for which the user name is supposed to be stored in
IdentityServiceOp UserOp. Value for this key is "Name"
- See Also:
- Constant Field Values
PASSWORD_KEY
public static final java.lang.String PASSWORD_KEY
- Property key for which the password is supposed to be stored in
IdentityServiceOp UserOp. Value for this key is "Password"
- See Also:
- Constant Field Values
PropertiesBasedAuthenticationService
public PropertiesBasedAuthenticationService(java.lang.String jmxUrl,
java.lang.String idServiceBindingName)
throws javax.management.MalformedObjectNameException,
javax.management.InstanceNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException,
java.io.IOException
- Throws:
javax.management.MalformedObjectNameException
javax.management.InstanceNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
java.io.IOException
authenticateUser
public java.lang.String authenticateUser(java.lang.String... params)
- Properties based
AuthenticationServiceOp
implementation.
When invoked, this method search for the first user registered into the
related IdentityServiceOp
implementation that has the property as a
property set for the key NAME_KEY
set to params[0]
and the property PASSWORD_KEY
set to params[1]
.
- Specified by:
authenticateUser
in interface AuthenticationServiceOp
- Parameters:
params
- an array of authentication strings (e.g.: login/password)
- Returns:
- the id mapped to a UserOp in the related
IdentityServiceOp
implementation or null if the authentication failed. - See Also:
NAME_KEY
,
PASSWORD_KEY
,
AuthenticationServiceOp.authenticateUser(String...)
,
IdentityServiceOp
Copyright © 2009 OW2 Consortium. All Rights Reserved.