Package org.tinyradius.packet.response
Class AccessResponse
java.lang.Object
org.tinyradius.packet.BaseRadiusPacket
org.tinyradius.packet.response.RadiusResponse
org.tinyradius.packet.response.AccessResponse
- All Implemented Interfaces:
AttributeHolder
,NestedAttributeHolder
,RadiusPacket
,MessageAuthSupport<AccessResponse>
public class AccessResponse extends RadiusResponse implements MessageAuthSupport<AccessResponse>
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AccessResponse(Dictionary dictionary, byte type, byte identifier, byte[] authenticator, java.util.List<RadiusAttribute> attributes)
-
Method Summary
Modifier and Type Method Description AccessResponse
copy()
AccessResponse
encodeResponse(java.lang.String sharedSecret, byte[] requestAuth)
Encode and generate authenticator.void
verifyResponse(java.lang.String sharedSecret, byte[] requestAuth)
Verifies the response authenticator against the supplied shared secret.Methods inherited from class org.tinyradius.packet.BaseRadiusPacket
createHashedAuthenticator, equals, getAttributes, getAuthenticator, getChildVendorId, getDictionary, getId, getMd5Digest, getType, hashCode, toString, verifyPacketAuth
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.tinyradius.attribute.util.AttributeHolder
addAttribute, addAttribute, getAttribute, getAttribute, getAttributeBytes, getAttributeMap, getAttributes, getAttributes, getAttributeString, getChildVendorId, lookupAttributeType, removeAttributes, removeLastAttribute
Methods inherited from interface org.tinyradius.packet.util.MessageAuthSupport
calcMessageAuthInput, computeMessageAuth, encodeMessageAuth, verifyMessageAuth
Methods inherited from interface org.tinyradius.attribute.util.NestedAttributeHolder
addAttribute, getAttribute, getAttributes, getAttributes, getVendorSpecificAttributes, removeAttribute, removeAttributes, removeSubAttribute
Methods inherited from interface org.tinyradius.packet.RadiusPacket
getAttributes, getAuthenticator, getDictionary, getId, getType
-
Constructor Details
-
AccessResponse
public AccessResponse(Dictionary dictionary, byte type, byte identifier, byte[] authenticator, java.util.List<RadiusAttribute> attributes)
-
-
Method Details
-
encodeResponse
Description copied from class:RadiusResponse
Encode and generate authenticator. Should be idempotent.Requires request authenticator to generator response authenticator.
- Overrides:
encodeResponse
in classRadiusResponse
- Parameters:
sharedSecret
- shared secret to be used to encode this packetrequestAuth
- request packet authenticator- Returns:
- new RadiusPacket instance with same properties and valid authenticator
-
verifyResponse
public void verifyResponse(java.lang.String sharedSecret, byte[] requestAuth) throws RadiusPacketExceptionDescription copied from class:RadiusResponse
Verifies the response authenticator against the supplied shared secret.- Overrides:
verifyResponse
in classRadiusResponse
- Parameters:
sharedSecret
- shared secretrequestAuth
- authenticator for corresponding request- Throws:
RadiusPacketException
- if authenticator check fails
-
copy
- Specified by:
copy
in interfaceMessageAuthSupport<AccessResponse>
- Specified by:
copy
in interfaceRadiusPacket
- Overrides:
copy
in classRadiusResponse
- Returns:
- packet of same type as self, including intermediate fields
-