AXL Software

com.theorem.radserver3
Class EAPInfo

Object
  extended byEAPInfo

public final class EAPInfo
extends Object

Class to handle the EAP (Extensible Authentication Protocol) protocol.


Field Summary
static int IDENTITY
          Default packet type if EAP-Start packet sent (0).
static int REQUEST
          Look for a request.
static int RESPONSE
          Look for a response.
 
Method Summary
 EAPPacket getPacket()
          Get the EAP Info packet.
 boolean handleStartPacket(String idMessage)
          Automatically handle an EAP-Start packet.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTITY

public static final int IDENTITY
Default packet type if EAP-Start packet sent (0). This will be the 'state' in the EAPState object retrieved by getStateObject() in calls subsequent to an EAP-Start packet.

See Also:
handleStartPacket(), Constant Field Values

REQUEST

public static final int REQUEST
Look for a request.

See Also:
Constant Field Values

RESPONSE

public static final int RESPONSE
Look for a response.

See Also:
Constant Field Values
Method Detail

getPacket

public EAPPacket getPacket()
Get the EAP Info packet.

Returns:
EAPPacket containing the EAP data.

handleStartPacket

public boolean handleStartPacket(String idMessage)
Automatically handle an EAP-Start packet.

EAP-Start packets are a rare occurrence since they are problematic in RADIUS authentication since they don't have a User-Name associated with them. This can prevent the ability to proxy such packets. The EAP-Start packet is an empty (no data portion) EAP-Message that results in the server requesting an EAP Identity packet. If you never expect an EAP-Start packet don't bother to use this method.

The handleEAPStart() method automatically forms the Identity request packet if an EAP-Start message is detected.

Note that if an EAP-Start packet is processed the next EAP-Message that is expected to arrive will have a packet type of Access-Challenge instead of the usual Access-Request and will have an EAP packet type of Identity. The State attribute will be associated with an EAPState object with the 'identifier' field set to the packet Identifier and the 'state' field set to IDENTITY.

This method is intended to be used like this:

 public void authenticate(...)
 ...
 // If a start packet appears handle it automatically
 // If it returns true just return from the AccessImpl class.
 if (handleStartPacket("Your Name:"))
 	return;

 // Continue on as normal handling EAP packets.
 

Parameters:
idMessage - Optional message to be sent with the Identity Request to the supplicant - something like "Your Name:" or null if no message is to be sent.
Returns:
True if the packet was an EAP-Start.

AXL Software

Submit a bug report or feature request

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