|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.examples.JdbcUserAuthenticationFactory
This class uses a database to store basic
set of users and groups for the example applications.
This class is provided for illustrative purposes
only and the source is included in the product delivery
at %HARMONY_HOME%\examples\source
.
Constructor Summary | |
JdbcUserAuthenticationFactory()
Constructor. |
Method Summary | |
static User |
createUser(java.lang.String sName,
java.lang.String sPassword,
java.lang.String sEmailAddress,
java.lang.String groups)
Creates a new user with the default locale and time zone. |
static User |
createUser(java.lang.String sName,
java.lang.String sPassword,
java.lang.String sEmailAddress,
java.lang.String groups,
java.util.Locale locale,
java.util.TimeZone timeZone)
Gets a user by name. |
User |
getAnonymousAuthentication()
Gets the anonymous authentication. |
User |
getUserAuthentication(UserInfo userInfo)
Gets the user authentication from the given user info. |
java.util.List |
groups()
Gets the list of groups (optional operation). |
java.util.List |
users()
Gets the list of users (optional operation). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JdbcUserAuthenticationFactory()
Method Detail |
public User getUserAuthentication(UserInfo userInfo) throws InvalidAuthenticationException
IUserAuthenticationFactory
getUserAuthentication
in interface IUserAuthenticationFactory
com.compoze.security.IUserAuthenticationFactory
userInfo
- the user informationnull
if user can not be determinedInvalidAuthenticationException
- occurs if the user authentication cannot be validated (ie. the user exists but cannot be authenticated with the specified user information credentials)public User getAnonymousAuthentication()
IUserAuthenticationFactory
getAnonymousAuthentication
in interface IUserAuthenticationFactory
com.compoze.security.IUserAuthenticationFactory
null
if none can be determinedpublic java.util.List users() throws java.lang.UnsupportedOperationException
IUserAuthenticationFactory
users
in interface IUserAuthenticationFactory
com.compoze.security.IUserAuthenticationFactory
User
objectsjava.lang.UnsupportedOperationException
- obtaining a list of users is not supported by this authentication factorypublic java.util.List groups() throws java.lang.UnsupportedOperationException
IUserAuthenticationFactory
groups
in interface IUserAuthenticationFactory
com.compoze.security.IUserAuthenticationFactory
Group
objectsjava.lang.UnsupportedOperationException
- obtaining a list of groups is not supported by this authentication factorypublic static User createUser(java.lang.String sName, java.lang.String sPassword, java.lang.String sEmailAddress, java.lang.String groups)
sName
- the user name (may not be null
)sPassword
- the password for the usersEmailAddress
- the email address for the usergroups
- a comma separated list of groups the user is member ofpublic static User createUser(java.lang.String sName, java.lang.String sPassword, java.lang.String sEmailAddress, java.lang.String groups, java.util.Locale locale, java.util.TimeZone timeZone)
sName
- the user name (may not be null
)sPassword
- the password for the usersEmailAddress
- the email address for the usergroups
- a comma separated list of groups the user is member oflocale
- the locale for the usertimeZone
- the time zone for the user
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |