| java.lang.Object com.flexive.core.security.FxDefaultLogin
FxDefaultLogin | public class FxDefaultLogin implements LoginModule(Code) | | Default login module.
author: Gregor Schober (gregor.schober@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at) version: $Rev: 261 $ |
Method Summary | |
public boolean | abort() This method is called if the LoginContext's overall authentication failed. | public boolean | commit() Abstract method to commit the authentication process (phase 2).
This method is called if the LoginContext's overall authentication succeeded
(the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded).
If this LoginModule's own authentication attempt succeeded (checked by retrieving the private state saved by the
login method), then this method associates a RdbmsPrincipal
with the Subject located in the
LoginModule . | public static UserTicket | getUserTicket(Subject sub) Returns the UserTicket stored within the subject. | public void | initialize(Subject sub, CallbackHandler callback, Map<String, ?> sharedState, Map<String, ?> options) Initialize this LoginModule. | public boolean | login() Verify the name/password combination. | public boolean | logout() Logout a user. | public static Subject | updateUserTicket(Subject sub, UserTicket ticket) |
FxDefaultLogin | public FxDefaultLogin()(Code) | | Constructor
|
abort | public boolean abort() throws LoginException(Code) | | This method is called if the LoginContext's overall authentication failed.
(the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules did not succeed).
If this LoginModule's own authentication attempt succeeded (checked by retrieving the private state saved by the
login and commit methods), then this method cleans up any state that was
originally saved.
false if this LoginModule's own login and/or commit attempts failed, and true otherwise. throws: LoginException - if the abort fails. |
commit | public boolean commit() throws LoginException(Code) | | Abstract method to commit the authentication process (phase 2).
This method is called if the LoginContext's overall authentication succeeded
(the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded).
If this LoginModule's own authentication attempt succeeded (checked by retrieving the private state saved by the
login method), then this method associates a RdbmsPrincipal
with the Subject located in the
LoginModule . If this LoginModule's own
authentication attempted failed, then this method removes
any state that was originally saved.
true if this LoginModule's own login and commit attempts succeeded, or false otherwise. throws: LoginException - if the commit fails |
getUserTicket | public static UserTicket getUserTicket(Subject sub) throws FxNotFoundException(Code) | | Returns the UserTicket stored within the subject.
Parameters: sub - the suubject the UserTicket stored within the subject throws: FxNotFoundException - if the subject doesnt hold a UserTicket.This should never happen since the Login Module fills outa UserTicket for every new subject. |
initialize | public void initialize(Subject sub, CallbackHandler callback, Map<String, ?> sharedState, Map<String, ?> options)(Code) | | Initialize this LoginModule.
Parameters: sub - the Subject to be authenticated. Parameters: callback - a CallbackHandler for communicating with the end user (prompting for usernames andpasswords, for example). Parameters: sharedState - shared LoginModule state. Parameters: options - options specified in the login Configuration for this particular LoginModule. |
login | public boolean login() throws LoginException(Code) | | Verify the name/password combination.
true always, since this LoginModule should not be ignored. throws: FailedLoginException - if the authentication fails. throws: LoginException - if this LoginModule is unable to perform the authentication. |
logout | public boolean logout() throws LoginException(Code) | | Logout a user.
This method removes the Principals that were added by the commit method.
true in all cases throws: LoginException - if the logout fails. |
updateUserTicket | public static Subject updateUserTicket(Subject sub, UserTicket ticket)(Code) | | Sets the user ticket within a subject
Parameters: sub - the subject Parameters: ticket - the new ticket for the subject the user ticket |
|
|