RADIUS Client API (V3)

com.theorem.radius3.login
Class ResponseAttributes

Object
  extended byResponseAttributes
All Implemented Interfaces:
Callback, Serializable
Direct Known Subclasses:
SetRequestAttributes

public class ResponseAttributes
extends Object
implements Callback, Serializable

Class to access attributes returned by the RADIUS login. This is the base handler class for most RADIUS handler classes.

Typically a handler class will be used in a CallbackHandler implementation as follows. The CallbackHandler may be called many times by RADIUSLogin so a each callback in the list can tell if the callback is for them. Since this is atypical behavior for a callback handler the handler is split into two parts, those that are processed only once (the standard callbacks) and the set of RADIUS callbacks which are prepared to handle multiple callbacks.

  if (callbacks[i] instanceof AccessAccept) {
    // Just pick up the response attributes object for now.
    // It'll be populated after authentication.
    accessAccept = ((AccessAccept) callbacks[i]);

    // If the data is valid (I.e. this callback is for AccessAccept)
    // we can access it.
    if (! accessAccept.isValid())
      continue;
    // Print out the attributes.
    System.out.println(accessAccept.getAttributes());
  }
 

See Also:
Serialized Form

Field Summary
static int Access_Accept
          Access-Accept (2).
static int Access_BadPacket
          Access-BadPacket (0).
static int Access_Challenge
          Access-Challenge (11).
static int Access_Reject
          Access-Reject (3).
 
Method Summary
 AttributeList getAttributes()
          Retrieve response attributes from the RADIUS client.
 int getResponse()
          Retrieve the server response.
 boolean isValid()
          Determine if the values in the callback class are ready to be accessed or modified.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Access_Accept

public static final int Access_Accept
Access-Accept (2).

See Also:
Constant Field Values

Access_Challenge

public static final int Access_Challenge
Access-Challenge (11).

See Also:
Constant Field Values

Access_Reject

public static final int Access_Reject
Access-Reject (3).

See Also:
Constant Field Values

Access_BadPacket

public static final int Access_BadPacket
Access-BadPacket (0). This is a special return resulting from an error in the received packet.

See Also:
Constant Field Values
Method Detail

getAttributes

public AttributeList getAttributes()
Retrieve response attributes from the RADIUS client.

Returns:
RADIUS attribute list.

getResponse

public int getResponse()
Retrieve the server response. It will be either Access-Accept or Access-Challenge.

Returns:
Access response.

isValid

public boolean isValid()
Determine if the values in the callback class are ready to be accessed or modified.

Returns:
True if the data is valid and may be read or written.

RADIUS Client 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.