public interface SubjectManagerLocal
| Modifier and Type | Method and Description |
|---|---|
void |
changePassword(org.rhq.core.domain.auth.Subject subject,
String username,
String password)
#see {@link SubjectManagerRemote#changePassword(Subject, String, String)
|
org.rhq.core.domain.auth.Subject |
checkAuthentication(String username,
String password)
Checks whether a user would successfully login with the provided credentials.
|
void |
createPrincipal(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Principal principal)
Creates a new principal (username and password) in the internal database.
|
void |
createPrincipal(org.rhq.core.domain.auth.Subject subject,
String username,
String password)
#see {@link SubjectManagerRemote#createPrincipal(Subject, String, String)
|
org.rhq.core.domain.auth.Subject |
createSubject(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject subjectToCreate)
#see {@link SubjectManagerRemote#createSubject(Subject, Subject)
|
org.rhq.core.domain.auth.Subject |
createSubject(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject subjectToCreate,
String password)
Creates a new subject, including their assigned roles, as well as an associated principal with the specified
password.
|
void |
deleteSubjects(org.rhq.core.domain.auth.Subject subject,
int[] subjectIds)
#see {@link SubjectManagerRemote#deleteSubjects(Subject, int[])
|
void |
deleteUsers(org.rhq.core.domain.auth.Subject subject,
int[] subjectIds)
Deletes the given set of users, including both the
Subject and Principal objects associated with
those users. |
Collection<String> |
findAllUsersWithPrincipals()
Get a collection of all user names, where the collection contains the names of all users that have principals
only.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.auth.Subject> |
findAvailableSubjectsForRole(org.rhq.core.domain.auth.Subject whoami,
Integer roleId,
Integer[] pendingSubjectIds,
org.rhq.core.domain.util.PageControl pc)
This returns a list of subjects that are available to be assigned to a given role but not yet assigned to that
role.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.auth.Subject> |
findSubjectsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.SubjectCriteria criteria) |
org.rhq.core.domain.auth.Subject |
getOverlord()
This returns the system super user subject that can be used to authorize the caller for any other system call.
|
org.rhq.core.domain.auth.Subject |
getSubjectById(int id) |
org.rhq.core.domain.auth.Subject |
getSubjectByName(String username) |
org.rhq.core.domain.auth.Subject |
getSubjectByNameAndSessionId(String username,
int sessionId) |
org.rhq.core.domain.auth.Subject |
getSubjectBySessionId(int sessionId) |
boolean |
isUserWithPrincipal(String username)
Checks that the user exists and has a
Principal associated with it. |
boolean |
isValidSessionId(int session,
String username,
int userid)
Determines if the given session ID is valid and it is associated with the given username and user ID.
|
org.rhq.core.domain.auth.Subject |
loadUserConfiguration(Integer subjectId)
Loads in the given subject's
preferences and
roles. |
org.rhq.core.domain.auth.Subject |
login(String username,
String password) |
org.rhq.core.domain.auth.Subject |
loginUnauthenticated(String username)
Logs in a user without performing any authentication.
|
void |
logout(int sessionId) |
void |
logout(org.rhq.core.domain.auth.Subject subject) |
org.rhq.core.domain.auth.Subject |
processSubjectForLdap(org.rhq.core.domain.auth.Subject subject,
String subjectPassword) |
org.rhq.core.domain.auth.Subject |
updateSubject(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject subjectToModify) |
org.rhq.core.domain.auth.Subject |
updateSubject(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject subjectToModify,
String newPassword)
Updates an existing subject, including their assigned roles, and optionally their password.
|
org.rhq.core.domain.auth.Subject loadUserConfiguration(Integer subjectId)
preferences and
roles.subjectId - identifies the subject whose preferences and roles are to be loadedorg.rhq.core.domain.auth.Subject getOverlord()
org.rhq.core.domain.auth.Subject loginUnauthenticated(String username) throws LoginException
username - The user to loginLoginException - if failed to create a new session for the given uservoid createPrincipal(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Principal principal)
throws SubjectException
subject - The subject of the currently logged in userprincipal - The principal to addException - if the principal could not be addedSubjectExceptionboolean isUserWithPrincipal(String username)
Principal associated with it. This means that the user both
exists and is authenticated via JDBC. An LDAP user will not have a Principal because it is authenticated
via the LDAP server, not from the database.username - the user whose existence is to be checkedtrue if the user exists and has a Principal, false otherwiseCollection<String> findAllUsersWithPrincipals()
void deleteUsers(org.rhq.core.domain.auth.Subject subject,
int[] subjectIds)
Subject and Principal objects associated with
those users.subject - the person requesting the deletionsubjectIds - identifies the subject IDs for all the users that are to be deletedException - if failed to delete one or more usersboolean isValidSessionId(int session,
String username,
int userid)
session - username - userid - true if the session ID indentifies a valid session; false if it is invalid or
has timed outorg.rhq.core.domain.util.PageList<org.rhq.core.domain.auth.Subject> findAvailableSubjectsForRole(org.rhq.core.domain.auth.Subject whoami,
Integer roleId,
Integer[] pendingSubjectIds,
org.rhq.core.domain.util.PageControl pc)
pendingSubjectIds since it is assumed the pending subjects will be assigned to the
role.whoami - user attempting to make this callroleId - the role whose list of available subjects are to be returnedpendingSubjectIds - the list of subjects that are planned to be given to the rolepc - void logout(int sessionId)
org.rhq.core.domain.auth.Subject getSubjectById(int id)
org.rhq.core.domain.auth.Subject getSubjectBySessionId(int sessionId)
throws Exception
Exceptionorg.rhq.core.domain.auth.Subject createSubject(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject subjectToCreate,
String password)
throws SubjectException,
javax.persistence.EntityExistsException
subject - the logged in user's subjectsubjectToCreate - the subject to be created (which will never be the same as subject)password - the password for the principal to be created for the new userSubjectExceptionjavax.persistence.EntityExistsExceptionorg.rhq.core.domain.auth.Subject updateSubject(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject subjectToModify,
String newPassword)
subject - the logged in user's subjectsubjectToModify - the subject whose data is to be updated (which may or may not be the same as subject)newPassword - if non-null, a new password to be set on the user's associated principalsubjectToModify instanceorg.rhq.core.domain.auth.Subject checkAuthentication(String username, String password)
username - the usernamepassword - the passwordvoid changePassword(org.rhq.core.domain.auth.Subject subject,
String username,
String password)
void createPrincipal(org.rhq.core.domain.auth.Subject subject,
String username,
String password)
throws SubjectException
SubjectExceptionorg.rhq.core.domain.auth.Subject createSubject(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject subjectToCreate)
throws SubjectException
SubjectExceptionvoid deleteSubjects(org.rhq.core.domain.auth.Subject subject,
int[] subjectIds)
org.rhq.core.domain.auth.Subject getSubjectByName(String username)
SubjectManagerRemote#getSubjectByName(String)}org.rhq.core.domain.auth.Subject getSubjectByNameAndSessionId(String username, int sessionId) throws Exception
ExceptionSubjectManagerRemote#getSubjectByNameAndSessionId(String, int)}org.rhq.core.domain.auth.Subject login(String username, String password) throws LoginException
LoginExceptionSubjectManagerRemote.login(String, String)void logout(org.rhq.core.domain.auth.Subject subject)
SubjectManagerRemote.logout(Subject)org.rhq.core.domain.auth.Subject updateSubject(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject subjectToModify)
org.rhq.core.domain.util.PageList<org.rhq.core.domain.auth.Subject> findSubjectsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.SubjectCriteria criteria)
org.rhq.core.domain.auth.Subject processSubjectForLdap(org.rhq.core.domain.auth.Subject subject,
String subjectPassword)
throws LoginException
LoginExceptionCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.