net.sf.jradius.session
Class RadiusSessionKeyProvider

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

public class RadiusSessionKeyProvider
extends java.lang.Object
implements SessionKeyProvider

The Default SessionKeyProvider.

Author:
David Bird

Constructor Summary
RadiusSessionKeyProvider()
           
 
Method Summary
 java.io.Serializable getAccessRequestKey(JRadiusRequest request)
          Generates a session hash key based on access-request attributes.
 java.io.Serializable getAccountingRequestKey(JRadiusRequest request)
          Generates a session hash key based on accounting-request attribtues.
 java.io.Serializable getAppSessionKey(JRadiusRequest request)
          Gets the session key based on the JRadiusSessionId attribute in the configItems.
 java.io.Serializable getClassKey(JRadiusRequest request)
          Gets the JRadius Class attribute containing the session key, if attribute exists.
protected  java.io.Serializable getKeyFromAttributeType(RadiusPacket req, int type, boolean required)
           
 java.io.Serializable getRequestSessionKey(JRadiusRequest request)
          Generates the session key for the given session.
 java.io.Serializable getTunneledRequestKey(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 java.io.Serializable getRequestSessionKey(JRadiusRequest request)
                                          throws 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 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:
RadiusException

getAccessRequestKey

public java.io.Serializable getAccessRequestKey(JRadiusRequest request)
                                         throws RadiusException
Generates a session hash key based on access-request attributes.

Parameters:
request - The JRadiusRequest
Returns:
the session key
Throws:
RadiusException

getClassKey

public java.io.Serializable getClassKey(JRadiusRequest request)
                                 throws RadiusException
Gets the JRadius Class attribute containing the session key, if attribute exists.

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

getAccountingRequestKey

public java.io.Serializable getAccountingRequestKey(JRadiusRequest request)
                                             throws RadiusException
Generates a session hash key based on accounting-request attribtues.

Parameters:
request - The JRadiusRequest
Returns:
the session key
Throws:
RadiusException

getAppSessionKey

public java.io.Serializable getAppSessionKey(JRadiusRequest request)
                                      throws RadiusException
Gets the session key based on the JRadiusSessionId attribute in the configItems.

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

getTunneledRequestKey

public java.io.Serializable getTunneledRequestKey(JRadiusRequest request)
                                           throws RadiusException
Throws:
RadiusException

getKeyFromAttributeType

protected java.io.Serializable getKeyFromAttributeType(RadiusPacket req,
                                                       int type,
                                                       boolean required)
                                                throws RadiusException
Throws:
RadiusException


Copyright © 2006 The JRadius Project, All Rights Reserved.