Method Summary |
|
public boolean | accountExists(User user) Check whether a specified user's account exists.
The login name is used for looking up the account.
Parameters: user - The user to be checked. |
public boolean | accountExists(String userName) Check whether a specified user's account exists.
The login name is used for looking up the account.
Parameters: userName - The name of the user to be checked. |
public void | addUser(User user, String password) Creates new user account with specified attributes. |
public void | changePassword(User user, String oldPassword, String newPassword) Change the password for an User. |
public boolean | checkPassword(String checkpw, String encpw) |
public String | encryptPassword(String password) This method provides client-side encryption of passwords.
If secure.passwords are enabled in TurbineResources,
the password will be encrypted, if not, it will be returned unchanged.
The secure.passwords.algorithm property can be used
to chose which digest algorithm should be used for performing the
encryption. |
public String | encryptPassword(String password, String salt) This method provides client-side encryption of passwords.
If secure.passwords are enabled in TurbineResources,
the password will be encrypted, if not, it will be returned unchanged.
The secure.passwords.algorithm property can be used
to chose which digest algorithm should be used for performing the
encryption. |
public void | forcePassword(User user, String password) Forcibly sets new password for an User.
This is supposed by the administrator to change the forgotten or
compromised passwords. |
public Class | getAclClass() Return a Class object representing the system's chosen implementation of
of ACL interface. |
public AccessControlList | getAclInstance(Map roles, Map permissions) Construct a new ACL object. |
public GroupSet | getAllGroups() Retrieves all groups defined in the system. |
public PermissionSet | getAllPermissions() Retrieves all permissions defined in the system. |
public RoleSet | getAllRoles() Retrieves all roles defined in the system. |
public User | getAnonymousUser() Constructs an User object to represent an anonymous user of the
application. |
public User | getAuthenticatedUser(String username, String password) Authenticates an user, and constructs an User object to represent
him/her.
Parameters: username - The user name. Parameters: password - The user password. |
public Group | getGlobalGroup() Provides a reference to the Group object that represents the
global group. |
public Group | getGroup(String name) Retrieve a Group object with specified name.
Parameters: name - the name of the Group. |
public Group | getGroupById(int id) Retrieve a Group object with specified Id.
Parameters: id - the id of the Group. |
public Group | getGroupByName(String name) Retrieve a Group object with specified name.
Parameters: name - the name of the Group. |
public Class | getGroupClass() Return a Class object representing the system's chosen implementation of
of Group interface. |
public Group | getGroupInstance() Construct a blank Group object. |
public Group | getGroupInstance(String groupName) Construct a blank Group object. |
public Group | getNewGroup(String groupName) |
public Permission | getNewPermission(String permissionName) |
public Role | getNewRole(String roleName) |
public Permission | getPermission(String name) Retrieve a Permission object with specified name.
Parameters: name - the name of the Permission. |
public Permission | getPermissionById(int id) Retrieve a Permission object with specified Id.
Parameters: id - the id of the Permission. |
public Permission | getPermissionByName(String name) Retrieve a Permission object with specified name.
Parameters: name - the name of the Permission. |
public Class | getPermissionClass() Return a Class object representing the system's chosen implementation of
of Permission interface. |
public Permission | getPermissionInstance() Construct a blank Permission object. |
public Permission | getPermissionInstance(String permName) Construct a blank Permission object.
This method calls getPermissionClass, and then creates a new object using
the default constructor.
Parameters: permName - The name of the permission. |
public Role | getRole(String name) Retrieve a Role object with specified name.
Parameters: name - the name of the Role. |
public Role | getRoleById(int id) Retrieve a Role object with specified Id.
Parameters: id - the id of the Role. |
public Role | getRoleByName(String name) Retrieve a Role object with specified name.
Parameters: name - the name of the Role. |
public Class | getRoleClass() Return a Class object representing the system's chosen implementation of
of Role interface. |
public Role | getRoleInstance() Construct a blank Role object. |
public Role | getRoleInstance(String roleName) Construct a blank Role object.
This method calls getRoleClass, and then creates a new object using
the default constructor.
Parameters: roleName - The name of the role. |
public User | getUser(String username) Constructs an User object to represent a registered user of the
application.
Parameters: username - The user name. |
public Class | getUserClass() Return a Class object representing the system's chosen implementation of
of User interface. |
public User | getUserInstance() Construct a blank User object. |
public User | getUserInstance(String userName) Construct a blank User object.
This method calls getUserClass, and then creates a new object using
the default constructor.
Parameters: userName - The name of the user. |
public List | getUserList(Criteria criteria) Retrieve a set of users that meet the specified criteria.
As the keys for the criteria, you should use the constants that
are defined in
User interface, plus the names
of the custom attributes you added to your user representation
in the data storage. |
public UserManager | getUserManager() Returns the configured UserManager. |
public User[] | getUsers(Criteria criteria) Retrieve a set of users that meet the specified criteria.
As the keys for the criteria, you should use the constants that
are defined in
User interface, plus the names
of the custom attributes you added to your user representation
in the data storage. |
public void | init() Initializes the SecurityService, locating the apropriate UserManager
This is a zero parameter variant which queries the Turbine Servlet
for its config. |
public void | init(ServletConfig config) |
public boolean | isAnonymousUser(User user) |
protected void | lockExclusive() Acquire an exclusive lock on the security information repository.
Methods that modify security information need to invoke this
method at the beginning of their body. |
protected synchronized void | lockShared() Acquire a shared lock on the security information repository. |
public void | removeUser(User user) Removes an user account from the system. |
public void | saveOnSessionUnbind(User user) Saves User data when the session is unbound. |
public void | saveUser(User user) Saves User's data in the permanent storage. |
public void | setUserManager(UserManager userManager) Configure a new user Manager. |
protected void | unlockExclusive() Release an exclusive lock on the security information repository.
This method is provided only for completeness. |
protected synchronized void | unlockShared() Release a shared lock on the security information repository. |