net.sf.jradius.client.auth
Class EAPAuthenticator

java.lang.Object
  extended by net.sf.jradius.client.auth.RadiusAuthenticator
      extended by net.sf.jradius.client.auth.EAPAuthenticator
Direct Known Subclasses:
EAPMD5Authenticator, EAPMSCHAPv2Authenticator, EAPTLSAuthenticator

public abstract class EAPAuthenticator
extends RadiusAuthenticator

EAP Authentication. This abstract class is extended to implement EAP protocols.

Author:
David Bird

Field Summary
static int EAP_CISCO_MSCHAPV2
           
static int EAP_FAILURE
           
static int EAP_GTC
           
static int EAP_HEADERLEN
           
static int EAP_IDENTITY
           
static int EAP_LEAP
           
static int EAP_MD5
           
static int EAP_MSCHAPV2
           
static int EAP_NAK
           
static int EAP_NOTIFICATION
           
static int EAP_OTP
           
static int EAP_PEAP
           
static int EAP_REQUEST
           
static int EAP_RESPONSE
           
static int EAP_SIM
           
static int EAP_SUCCESS
           
static int EAP_TLS
           
static int EAP_TLV
           
static int EAP_TTLS
           
 
Fields inherited from class net.sf.jradius.client.auth.RadiusAuthenticator
client, password, username
 
Constructor Summary
EAPAuthenticator()
           
 
Method Summary
protected  byte[] doEAP(byte[] eapReply)
           
abstract  byte[] doEAPType(byte id, byte[] data)
           
protected  byte[] eapResponse(int type, byte id, byte[] data)
          Encodes an EAP-Response
 byte getEAPType()
           
 boolean isStartWithIdentity()
           
protected  byte[] negotiateEAPType(byte id, byte eapType)
          Negotiates the EAP Authentication Protocol to use
 void processChallenge(RadiusPacket p, RadiusPacket r)
          EAP requires a challenge/response.
 void processRequest(RadiusPacket p)
           
 void setEAPType(int eapType)
           
 void setStartWithIdentity(boolean startWithIdentity)
           
 
Methods inherited from class net.sf.jradius.client.auth.RadiusAuthenticator
getAuthName, getClient, getPassword, getUsername, setClient, setupRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EAP_HEADERLEN

public static final int EAP_HEADERLEN
See Also:
Constant Field Values

EAP_REQUEST

public static final int EAP_REQUEST
See Also:
Constant Field Values

EAP_RESPONSE

public static final int EAP_RESPONSE
See Also:
Constant Field Values

EAP_SUCCESS

public static final int EAP_SUCCESS
See Also:
Constant Field Values

EAP_FAILURE

public static final int EAP_FAILURE
See Also:
Constant Field Values

EAP_IDENTITY

public static final int EAP_IDENTITY
See Also:
Constant Field Values

EAP_NOTIFICATION

public static final int EAP_NOTIFICATION
See Also:
Constant Field Values

EAP_NAK

public static final int EAP_NAK
See Also:
Constant Field Values

EAP_MD5

public static final int EAP_MD5
See Also:
Constant Field Values

EAP_OTP

public static final int EAP_OTP
See Also:
Constant Field Values

EAP_GTC

public static final int EAP_GTC
See Also:
Constant Field Values

EAP_TLS

public static final int EAP_TLS
See Also:
Constant Field Values

EAP_LEAP

public static final int EAP_LEAP
See Also:
Constant Field Values

EAP_SIM

public static final int EAP_SIM
See Also:
Constant Field Values

EAP_TTLS

public static final int EAP_TTLS
See Also:
Constant Field Values

EAP_PEAP

public static final int EAP_PEAP
See Also:
Constant Field Values

EAP_MSCHAPV2

public static final int EAP_MSCHAPV2
See Also:
Constant Field Values

EAP_CISCO_MSCHAPV2

public static final int EAP_CISCO_MSCHAPV2
See Also:
Constant Field Values

EAP_TLV

public static final int EAP_TLV
See Also:
Constant Field Values
Constructor Detail

EAPAuthenticator

public EAPAuthenticator()
Method Detail

processRequest

public void processRequest(RadiusPacket p)
                    throws RadiusException
Specified by:
processRequest in class RadiusAuthenticator
Parameters:
p - The RadiusPacket to be processed
Throws:
RadiusException
See Also:
RadiusAuthenticator.processRequest(net.sf.jradius.packet.RadiusPacket)

processChallenge

public void processChallenge(RadiusPacket p,
                             RadiusPacket r)
                      throws RadiusException
EAP requires a challenge/response. The request packet is reset with a new RADIUS itentifier and the EAP-Message is encoded.

Overrides:
processChallenge in class RadiusAuthenticator
Parameters:
p - The original AccessRequest RadiusPacket
r - The AccessChallenge packet
Throws:
RadiusException
See Also:
RadiusAuthenticator.processChallenge(net.sf.jradius.packet.RadiusPacket, net.sf.jradius.packet.RadiusPacket)

getEAPType

public byte getEAPType()
Returns:
Returns the EAP Type.

setEAPType

public void setEAPType(int eapType)
Parameters:
eapType - The eapType to set.

doEAPType

public abstract byte[] doEAPType(byte id,
                                 byte[] data)
                          throws RadiusException
Parameters:
id - The EAP ID
data - The EAP Data
Returns:
Returns the EAP-Type specific EAP-Message
Throws:
RadiusException

doEAP

protected byte[] doEAP(byte[] eapReply)
                throws RadiusException
Parameters:
eapReply - The in-coming EAP-Message
Returns:
Returns the out-bound EAP-Message
Throws:
RadiusException

negotiateEAPType

protected byte[] negotiateEAPType(byte id,
                                  byte eapType)
Negotiates the EAP Authentication Protocol to use

Parameters:
id - The EAP ID
eapType - The wanted EAP Protocol Type
Returns:
Returns the EAP-Message

eapResponse

protected byte[] eapResponse(int type,
                             byte id,
                             byte[] data)
Encodes an EAP-Response

Parameters:
type - The EAP-Type
id - The EAP Packet ID
data - The EAP-Message data
Returns:
Returns the EAP-Message

isStartWithIdentity

public boolean isStartWithIdentity()

setStartWithIdentity

public void setStartWithIdentity(boolean startWithIdentity)


Copyright © 2006 The JRadius Project, All Rights Reserved.