Class AccessResponse
java.lang.Object
org.tinyradius.core.packet.BaseRadiusPacket<RadiusResponse>
org.tinyradius.core.packet.response.GenericResponse
org.tinyradius.core.packet.response.AccessResponse
- All Implemented Interfaces:
AttributeHolder<RadiusResponse>
,NestedAttributeHolder<RadiusResponse>
,RadiusPacket<RadiusResponse>
,RadiusResponse
,MessageAuthSupport<RadiusResponse>
- Direct Known Subclasses:
AccessResponse.Accept
,AccessResponse.Challenge
,AccessResponse.Reject
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
Fields inherited from interface org.tinyradius.core.attribute.AttributeHolder
attrHolderLogger
Fields inherited from interface org.tinyradius.core.packet.util.MessageAuthSupport
MESSAGE_AUTHENTICATOR, msgAuthLogger
Fields inherited from interface org.tinyradius.core.packet.RadiusPacket
HEADER_LENGTH, MAX_PACKET_LENGTH
-
Method Summary
Modifier and TypeMethodDescriptiondecodeResponse
(String sharedSecret, byte[] requestAuth) Decodes the response against the supplied shared secret and request authenticator.encodeResponse
(String sharedSecret, byte[] requestAuth) Encode and generate authenticator.Methods inherited from class org.tinyradius.core.packet.response.GenericResponse
with
Methods inherited from class org.tinyradius.core.packet.BaseRadiusPacket
equals, getAttributes, getAuthenticator, getChildVendorId, getDictionary, getHeader, getId, getType, hashCode, toString, verifyPacketAuth, withAttributes, withAuthAttributes
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.tinyradius.core.attribute.AttributeHolder
addAttribute, addAttribute, decodeAttributes, encodeAttributes, getAttribute, getAttribute, getAttributeByteBuf, getAttributes, getAttributes, getAttributes, getAttributes, getChildVendorId, getDictionary, removeAttributes, removeLastAttribute, withAttributes
Methods inherited from interface org.tinyradius.core.packet.util.MessageAuthSupport
computeMessageAuth, encodeMessageAuth, verifyMessageAuth
Methods inherited from interface org.tinyradius.core.attribute.NestedAttributeHolder
addAttribute, getAttribute, getAttributes, getAttributes, getFlattenedAttributes, getVendorAttributes, removeAttribute, removeAttributes
Methods inherited from interface org.tinyradius.core.packet.RadiusPacket
genHashedAuth, getAuthenticator, getHeader, getId, getLength, getType, toByteBuf, toByteBuffer, toBytes
-
Method Details
-
encodeResponse
public RadiusResponse encodeResponse(String sharedSecret, byte[] requestAuth) throws RadiusPacketException Description copied from interface:RadiusResponse
Encode and generate authenticator.Requires request authenticator to generate response authenticator.
Must be idempotent.
- Specified by:
encodeResponse
in interfaceRadiusResponse
- Overrides:
encodeResponse
in classGenericResponse
- Parameters:
sharedSecret
- shared secret to be used to encode this packetrequestAuth
- request packet authenticator- Returns:
- new RadiusPacket instance with same properties and valid authenticator
- Throws:
RadiusPacketException
- errors encoding packet
-
decodeResponse
public RadiusResponse decodeResponse(String sharedSecret, byte[] requestAuth) throws RadiusPacketException Description copied from interface:RadiusResponse
Decodes the response against the supplied shared secret and request authenticator.Must be idempotent.
- Specified by:
decodeResponse
in interfaceRadiusResponse
- Overrides:
decodeResponse
in classGenericResponse
- Parameters:
sharedSecret
- shared secretrequestAuth
- authenticator for corresponding request- Returns:
- verified RadiusResponse with decoded attributes if appropriate
- Throws:
RadiusPacketException
- errors verifying or decoding packet
-