Home » openjdk-7 » net.sourceforge » jradiusclient » jaas » [javadoc | source]
net.sourceforge.jradiusclient.jaas
public class: RadiusLoginModule [javadoc | source]
java.lang.Object
   net.sourceforge.jradiusclient.jaas.RadiusLoginModule

All Implemented Interfaces:
    LoginModule

This is an implementation of javax.security.auth.spi.LoginModule specific to using a RADIUS Server for authentication.
Field Summary
public static final  int MAX_CHALLENGE_ATTEMPTS     
Method from net.sourceforge.jradiusclient.jaas.RadiusLoginModule Summary:
abort,   commit,   initialize,   login,   logout
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from net.sourceforge.jradiusclient.jaas.RadiusLoginModule Detail:
 public boolean abort() throws LoginException 
    Method to abort the authentication process (phase 2). This method gets called if the LoginContext's overall authentication process failed (i.e. one of the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules did not succeed). It also cleans up any internal state saved by the login method.
 public boolean commit() throws LoginException 
    Method to commit the authentication process (phase 2). This method gets called if the LoginContext's overall authentication process succeeded (i.e. all of 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 relevant Principals and Credentials with the Subject located in the LoginModule. If this LoginModule's own authentication attempt failed, then this method cleans up any internal state saved by the login method. (TODO perform a RADIUS accounting request to notify RADIUS server of login time.)
 public  void initialize(Subject subject,
    CallbackHandler callbackHandler,
    Map sharedState,
    Map options) 
    Initialize this LoginModule. This method is called by the LoginContext after this LoginModule has been instantiated. The purpose of this method is to initialize this LoginModule with the relevant information. If this LoginModule does not understand any of the data stored in sharedState or options parameters, they can be ignored. There MUST be the following parameters specified in the options:
    • hostname - the fully qualified name or IP address of the RADIUS Server
    • shared secret - the secret shared between us and the RADIUS Server
    The following parameters MAY be specified, but they must be supplied together:
    • Authenication Port - The port the RADIUS Server is listening on for authentication
    • Accounting Port - The port the RADIUS Server is listening on for accounting requests
 public boolean login() throws LoginException 
    Authenticates this Subject against a RADIUS Server (phase 1). It uses the callbacks to request a UserName and a Password, and possibly requests a response to a challenge recieved from the RADIUS server.
 public boolean logout() throws LoginException 
    This method logs out a Subject (TODO perform a RADIUS accounting request to notify RADIUS server of logout time.)