net.jradius.session
Class RadiusSessionKeyProvider

java.lang.Object
  extended by net.jradius.session.RadiusSessionKeyProvider
All Implemented Interfaces:
net.jradius.session.SessionKeyProvider

public class RadiusSessionKeyProvider
extends Object
implements net.jradius.session.SessionKeyProvider

The Default SessionKeyProvider.

Author:
David Bird

Constructor Summary
RadiusSessionKeyProvider()
           
 
Method Summary
 Serializable getAccessRequestKey(net.jradius.server.JRadiusRequest request)
          Generates a session hash key based on access-request attributes.
 Serializable getAccountingRequestKey(net.jradius.server.JRadiusRequest request)
          Generates a session hash key based on accounting-request attribtues.
 Serializable getAppSessionKey(net.jradius.server.JRadiusRequest request)
          Gets the session key based on the JRadiusSessionId attribute in the configItems.
 Serializable getClassKey(net.jradius.server.JRadiusRequest request)
          Gets the JRadius Class attribute containing the session key, if attribute exists.
 Serializable getDHCPRequestKey(net.jradius.server.JRadiusRequest request)
          Generates a session hash key based on dhcp-packet attributes.
protected  Serializable getKeyFromAttributeType(net.jradius.packet.RadiusPacket req, long type, boolean required)
           
 Serializable getRequestSessionKey(net.jradius.server.JRadiusRequest request)
          Generates the session key for the given session.
 Serializable getTunneledRequestKey(net.jradius.server.JRadiusRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadiusSessionKeyProvider

public RadiusSessionKeyProvider()
Method Detail

getRequestSessionKey

public Serializable getRequestSessionKey(net.jradius.server.JRadiusRequest request)
                                  throws net.jradius.exception.RadiusException
Generates the session key for the given session. If the key is changing, as in the case when we move from authentication to accounting, this method will return an Object[2] which instructs the session manage to "rehash" the session under a new key (for uniqueness).

Specified by:
getRequestSessionKey in interface net.jradius.session.SessionKeyProvider
Parameters:
request - The JRadiusRequest
Returns:
the session key, or an array of 2 keys, the second replacing the first as the session hash key.
Throws:
net.jradius.exception.RadiusException

getAccessRequestKey

public Serializable getAccessRequestKey(net.jradius.server.JRadiusRequest request)
                                 throws net.jradius.exception.RadiusException
Generates a session hash key based on access-request attributes.

Parameters:
request - The JRadiusRequest
Returns:
the session key
Throws:
net.jradius.exception.RadiusException

getDHCPRequestKey

public Serializable getDHCPRequestKey(net.jradius.server.JRadiusRequest request)
                               throws net.jradius.exception.RadiusException
Generates a session hash key based on dhcp-packet attributes.

Parameters:
request - The JRadiusRequest
Returns:
the session key
Throws:
net.jradius.exception.RadiusException

getClassKey

public Serializable getClassKey(net.jradius.server.JRadiusRequest request)
                         throws net.jradius.exception.RadiusException
Gets the JRadius Class attribute containing the session key, if attribute exists.

Specified by:
getClassKey in interface net.jradius.session.SessionKeyProvider
Parameters:
request - The JRadiusRequest
Returns:
the session key
Throws:
net.jradius.exception.RadiusException

getAccountingRequestKey

public Serializable getAccountingRequestKey(net.jradius.server.JRadiusRequest request)
                                     throws net.jradius.exception.RadiusException
Generates a session hash key based on accounting-request attribtues.

Parameters:
request - The JRadiusRequest
Returns:
the session key
Throws:
net.jradius.exception.RadiusException

getAppSessionKey

public Serializable getAppSessionKey(net.jradius.server.JRadiusRequest request)
                              throws net.jradius.exception.RadiusException
Gets the session key based on the JRadiusSessionId attribute in the configItems.

Specified by:
getAppSessionKey in interface net.jradius.session.SessionKeyProvider
Parameters:
request - The JRadiusRequest
Returns:
the session key
Throws:
net.jradius.exception.RadiusException

getTunneledRequestKey

public Serializable getTunneledRequestKey(net.jradius.server.JRadiusRequest request)
                                   throws net.jradius.exception.RadiusException
Throws:
net.jradius.exception.RadiusException

getKeyFromAttributeType

protected Serializable getKeyFromAttributeType(net.jradius.packet.RadiusPacket req,
                                               long type,
                                               boolean required)
                                        throws net.jradius.exception.RadiusException
Throws:
net.jradius.exception.RadiusException


Copyright © 2011 Coova Technologies, LLC, All Rights Reserved.