|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SubjectManagerLocal
The local EJB interface to the Authentication Boss.
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
org.rhq.core.domain.auth.Subject loadUserConfiguration(Integer subjectId)
preferences and
roles.
subjectId - identifies the subject whose preferences and roles are to be loaded
org.rhq.core.domain.auth.Subject getOverlord()
org.rhq.core.domain.auth.Subject loginUnauthenticated(String username)
throws LoginException
username - The user to login
LoginException - if failed to create a new session for the given user
void 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 add
Exception - if the principal could not be added
SubjectExceptionboolean 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 checked
true 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 deleted
Exception - if failed to delete one or more users
boolean 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 out
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)
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
Exception
org.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 user
SubjectException
javax.persistence.EntityExistsException
org.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 principal
subjectToModify instance
org.rhq.core.domain.auth.Subject checkAuthentication(String username,
String password)
username - the usernamepassword - the password
void 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
SubjectException
org.rhq.core.domain.auth.Subject createSubject(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.auth.Subject subjectToCreate)
throws SubjectException
SubjectException
void 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)
SubjectManagerRemote.updateSubject(org.rhq.core.domain.auth.Subject, org.rhq.core.domain.auth.Subject)
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)
SubjectManagerRemote.findSubjectsByCriteria(Subject, SubjectCriteria)
org.rhq.core.domain.auth.Subject processSubjectForLdap(org.rhq.core.domain.auth.Subject subject,
String subjectPassword)
throws LoginException
LoginException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||