UserProviderControl Interface

com.bea.p13n.controls.securityProvider
UserProviderControl Interface

public interface UserProviderControl

    extends Control

This control:


Control properties:
Security requirements: These are determined by the roles specified on the AtnSecurityProvider MBean for the application. For example:

Related Topics

ProfileWrapper


All Superinterfaces
Control, Control, Serializable

Method Summary

public void
createUser(String username, String password, HttpServletRequest request)
Create a new user and return an object representing the user's information.
public void
createUserSimple(String username, String password)
Create a new user and return an object representing the user's information.
public List
getUserNames(String searchExpression, int limit)
Get a list of all user names
public void
removeUser(String username)
Removes a user from the system.
public void
setPassword(String username, String password)
Sets the password for a user in the realm.
public boolean
userExists(String username)
Determine whether a user exists

Method Detail

createUser(String, String, HttpServletRequest) Method

public void createUser(String username, 
                       String password, 
                       HttpServletRequest request)
throws UserAlreadyExistsException, InvalidUsernameException, LoginException, InvalidPasswordException, OperationNotSupportedException
Create a new user and return an object representing the user's information. Use this API if you want to do post-processing on the user after creation, or if you want to override any of the default control properties described above.

Parameters

username
The user's login name
password
The user's password
request
The HttpServletRequest

Exceptions

UserAlreadyExistsException
if the username is already in use
InvalidUsernameException
if the username is malformed or otherwise invalid
LoginException
if the user cannot be logged in (assuming that option was chosen)
InvalidPasswordException
if the password is malformed or otherwise invalid
OperationNotSupportedException
if authentication provider implementation does not support this operation

createUserSimple(String, String) Method

public void createUserSimple(String username, 
                             String password)
throws UserAlreadyExistsException, InvalidUsernameException, InvalidPasswordException, OperationNotSupportedException
Create a new user and return an object representing the user's information. Use this API if you don't care to do any post-processing on the user, nor perform any of the tasks described by the control property settings. Those properties will all be ignored and the user created with no further action.

Parameters

username
The user's login name
password
The user's password

Exceptions

UserAlreadyExistsException
if the username is already in use
InvalidUsernameException
if the username is malformed or otherwise invalid
InvalidPasswordException
if the password is malformed or otherwise invalid
OperationNotSupportedException
if authentication provider implementation does not support this operation

getUserNames(String, int) Method

public List getUserNames(String searchExpression, 
                         int limit)
throws OperationNotSupportedException
Get a list of all user names

Parameters

searchExpression
a wildcard search expression
limit
a limit of results to return

Returns

a List of all user names matching the search expression

Exceptions

OperationNotSupportedException
if authentication provider implementation does not support this operation

removeUser(String) Method

public void removeUser(String username)
throws InvalidUsernameException, OperationNotSupportedException
Removes a user from the system. This will remove both the realm and profile records for this user. Security constraints should restrict use of this method to administrators only.

Parameters

username
the username of the user to remove

Exceptions

InvalidUsernameException
if the user is protected and cannot be deleted
OperationNotSupportedException
if authentication provider implementation does not support this operation

setPassword(String, String) Method

public void setPassword(String username, 
                        String password)
throws InvalidPasswordException, OperationNotSupportedException
Sets the password for a user in the realm. Security constraints should restrict use of this method to administrators only.

Parameters

username
the username of the user
password
the new password for the user

Exceptions

InvalidPasswordException
OperationNotSupportedException
if authentication provider implementation does not support this operation

userExists(String) Method

public boolean userExists(String username)
throws OperationNotSupportedException
Determine whether a user exists

Parameters

username
The user (login) name of the user

Returns

true if the user exists, false if cannot find user of this name

Exceptions

OperationNotSupportedException
if authentication provider implementation does not support this operation