|
||||||||||
| 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 | |
|---|---|
boolean |
authenticateTemporarySessionPassword(java.lang.String password)
Tests the validity of the given session password. |
void |
changePassword(Subject subject,
java.lang.String username,
java.lang.String password)
#see {@link SubjectManagerRemote#changePassword(Subject, String, String) |
void |
createPrincipal(Subject subject,
Principal principal)
Creates a new principal (username and password) in the internal database. |
void |
createPrincipal(Subject subject,
java.lang.String username,
java.lang.String password)
#see {@link SubjectManagerRemote#createPrincipal(Subject, String, String) |
Subject |
createSubject(Subject subject,
Subject subjectToCreate)
#see {@link SubjectManagerRemote#createSubject(Subject, Subject) |
void |
deleteSubjects(Subject subject,
int[] subjectIds)
#see {@link SubjectManagerRemote#deleteSubjects(Subject, int[]) |
void |
deleteUsers(Subject subject,
int[] subjectIds)
Deletes the given set of users, including both the Subject and Principal objects associated with
those users. |
PageList<Subject> |
findAllSubjects(PageControl pageControl)
|
java.util.Collection<java.lang.String> |
findAllUsersWithPrincipals()
Get a collection of all user names, where the collection contains the names of all users that have principals only. |
PageList<Subject> |
findAvailableSubjectsForAlertDefinition(Subject whoami,
java.lang.Integer alertDefinitionId,
java.lang.Integer[] pendingSubjectIds,
PageControl pc)
This returns a list of subjects that are available to be assigned to a given alert definition but not yet assigned to that alert definition. |
PageList<Subject> |
findAvailableSubjectsForRole(Subject whoami,
java.lang.Integer roleId,
java.lang.Integer[] pendingSubjectIds,
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. |
PageList<Subject> |
findSubjectsByCriteria(Subject subject,
SubjectCriteria criteria)
|
PageList<Subject> |
findSubjectsById(java.lang.Integer[] subjectIds,
PageControl pageControl)
Given a set of subject Ids, this returns a list of all the subjects. |
java.lang.String |
generateTemporarySessionPassword(int sessionId)
Generates a one-time temporary session password for the given session. |
Subject |
getOverlord()
This returns the system super user subject that can be used to authorize the caller for any other system call. |
Subject |
getSessionSubject(int sessionId)
Returns the actual Subject for the given session. |
Subject |
getSubjectById(int id)
#see SubjectManagerRemote#getSubjectById(Subject, int) |
Subject |
getSubjectByName(java.lang.String username)
|
boolean |
isLoggedIn(java.lang.String username)
|
boolean |
isUserWithPrincipal(java.lang.String username)
Checks that the user exists and has a Principal associated with it. |
boolean |
isValidSessionId(int session,
java.lang.String username)
Determines if the given session ID is valid and it is associated with the given user. |
Subject |
loadUserConfiguration(java.lang.Integer subjectId)
Loads in the given subject's configuration. |
Subject |
login(java.lang.String username,
java.lang.String password)
|
Subject |
loginUnauthenticated(java.lang.String user,
boolean reattach)
Logs in a user without performing any authentication. |
void |
logout(int sessionId)
|
void |
logout(Subject subject)
|
Subject |
updateSubject(Subject subject,
Subject subjectToModify)
|
| Method Detail |
|---|
Subject loadUserConfiguration(java.lang.Integer subjectId)
configuration.
subjectId - identifies the subject whose user configuration is to be loaded
PageList<Subject> findSubjectsById(java.lang.Integer[] subjectIds,
PageControl pageControl)
subjectIds - pageControl -
Subject getOverlord()
PageList<Subject> findAllSubjects(PageControl pageControl)
SubjectManagerRemote#findAllSubjects(PageControl)java.lang.String generateTemporarySessionPassword(int sessionId)
Note that this method should only be available on this EJB's local interface.
sessionId - the session to assign a temporary password to
boolean authenticateTemporarySessionPassword(java.lang.String password)
throws java.lang.Exception
true if the password is valid and the
session is still valid.
password - a temporary session password that was created by generateTemporarySessionPassword(int).
true if the given password is valid and its associated session is still valid
java.lang.Exception - if the password was valid but its associated session has either timed out or was invalidated
Subject loginUnauthenticated(java.lang.String user,
boolean reattach)
throws LoginException
true for the "reattach", this method will
re-attach to an existing session for the user, if one is active already. If one does not exist, this method will
login and create a new session just as if that parameter was false.
user - The user to authenticate and loginreattach - If true, will re-attach to an existing login session, if one exists
Subject
LoginException - if failed to create a new session for the given user
void createPrincipal(Subject subject,
Principal principal)
throws SubjectException
subject - The subject of the currently logged in userprincipal - The principal to add
java.lang.Exception - if the principal could not be added
SubjectExceptionboolean isUserWithPrincipal(java.lang.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 otherwisejava.util.Collection<java.lang.String> findAllUsersWithPrincipals()
void deleteUsers(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
java.lang.Exception - if failed to delete one or more users
Subject getSessionSubject(int sessionId)
throws java.lang.Exception
Subject for the given session.
sessionId -
Subject representation of the user that is logged in with that session ID
java.lang.Exception - if the subject could not be retreived for some reason
boolean isValidSessionId(int session,
java.lang.String username)
session - username -
true if the session ID indentifies a valid session; false if it is invalid or
has timed out
PageList<Subject> findAvailableSubjectsForRole(Subject whoami,
java.lang.Integer roleId,
java.lang.Integer[] pendingSubjectIds,
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 -
PageList<Subject> findAvailableSubjectsForAlertDefinition(Subject whoami,
java.lang.Integer alertDefinitionId,
java.lang.Integer[] pendingSubjectIds,
PageControl pc)
pendingSubjectIds since it is assumed the pending
subjects will be assigned to the alert definition.
whoami - user attempting to make this callalertDefinitionId - the alert definition whose list of available subjects are to be returnedpendingSubjectIds - the list of subjects that are planned to be given to the alert definitionpc -
void logout(int sessionId)
void changePassword(Subject subject,
java.lang.String username,
java.lang.String password)
void createPrincipal(Subject subject,
java.lang.String username,
java.lang.String password)
throws SubjectException
SubjectException
Subject createSubject(Subject subject,
Subject subjectToCreate)
throws SubjectException
SubjectException
void deleteSubjects(Subject subject,
int[] subjectIds)
Subject getSubjectById(int id)
SubjectManagerRemote#getSubjectById(Subject, int)
Subject getSubjectByName(java.lang.String username)
SubjectManagerRemote#getSubjectByName(String)}boolean isLoggedIn(java.lang.String username)
SubjectManagerRemote#isLoggedIn(String)
Subject login(java.lang.String username,
java.lang.String password)
throws LoginException
LoginExceptionSubjectManagerRemote.login(String, String)void logout(Subject subject)
Subject updateSubject(Subject subject,
Subject subjectToModify)
PageList<Subject> findSubjectsByCriteria(Subject subject,
SubjectCriteria criteria)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||