AXL RADIUS Server API V3

com.theorem.radserver3.module.leapclient
Class LEAPCLIENTImpl

Object
  extended byLEAPCLIENT
      extended byLEAPCLIENTImpl

public class LEAPCLIENTImpl
extends LEAPCLIENT

Class to perform the LEAP (Lightweight EAP) exchange protocol for the RADIUS server/


Field Summary
 byte LEAPVersion
           
static int NO_STATE
          State - initial state, no state assigned - 0.
static int SEND_SUCCESS
          State - notification of success to end program - 8.
 
Constructor Summary
LEAPCLIENTImpl(RADIUSClient rc)
          Constructor for the LEAP client.
 
Method Summary
 boolean authenticate()
          Authenticate using the LEAP protocol.
 byte[] getSessionKey()
          Get the session key.
 void setCommonAttributes(AttributeList commonList)
          Set attributes to be sent with each LEAP request.
 void setLEAPIdentity(String leapIdentity)
          Set the User-Name attribute value.
 void setPassword(byte[] password)
          Set the password to use for authentication.
 void setUserName(String userName)
          Set the User-Name attribute value.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEAPVersion

public final byte LEAPVersion
See Also:
Constant Field Values

NO_STATE

public static final int NO_STATE
State - initial state, no state assigned - 0.

See Also:
Constant Field Values

SEND_SUCCESS

public static final int SEND_SUCCESS
State - notification of success to end program - 8.

See Also:
Constant Field Values
Constructor Detail

LEAPCLIENTImpl

public LEAPCLIENTImpl(RADIUSClient rc)
               throws RADIUSException
Constructor for the LEAP client.

Parameters:
rc - RADIUS Client.
Throws:
RADIUSException - if there's a problem accessing DES encoding.
Method Detail

authenticate

public boolean authenticate()
                     throws ClientSendException,
                            SocketException,
                            ClientReceiveException,
                            EAPException
Authenticate using the LEAP protocol.

Returns:
True if the authentication completed succesfully, false otherwise.
Throws:
EAPException - for a number of EAP problems.
SocketException - if the client is unable to obtain a new socket during the session.
ClientReceiveException - if there's a problem receiving a packet.
ClientSendException - if there's a problem sending a packet.

getSessionKey

public byte[] getSessionKey()
Get the session key.

Returns:
The session key. If the session key is null the authentication failed.

setCommonAttributes

public void setCommonAttributes(AttributeList commonList)
Set attributes to be sent with each LEAP request. This must not contain the User-Name attribute.

Parameters:
commonList - Common attributes to send with each LEAP request.

setLEAPIdentity

public void setLEAPIdentity(String leapIdentity)
Set the User-Name attribute value.

There are two 'names' associated with the LEAP protocol. One is the RADIUS User-Name value that may or may not have a 'realm' associated with it. A realm is used to direct the authentication to the proper machine. The other 'name' is the identity value associated with the EAP protcols. Realm information provided in the User-Name may not be appropriate and in this case can be provided without realm information..

If the EAP Identity and RADIUS User-Name are the same only one must be set.

Parameters:
leapIdentity - LEAP Identity value.

setPassword

public void setPassword(byte[] password)
Set the password to use for authentication.

Parameters:
password - Password. The password should be encoded using UTF8 encoding.
See Also:
Util.toUTF8(byte[] b), Util.toUTF8(String s)

setUserName

public void setUserName(String userName)
Set the User-Name attribute value.

There are two 'names' associated with the LEAP protocol. One is the RADIUS User-Name value that may or may not have a 'realm' associated with it. A realm is used to direct the authentication to the proper machine. The other 'name' is the identity value associated with the EAP protcols. Realm information provided in the User-Name may not be appropriate and in this case can be provided without realm information..

If the EAP Identity and RADIUS User-Name are the same only one must be set.

Parameters:
userName - User-Name value.

AXL RADIUS Server API V3

Submit a bug report or feature request

Copyright 1998-2008 AXL Software. PO Box 97, Viola, Delaware 19979, U.S.A. All Rights Reserved.