Class RequestAuthenticator
- java.lang.Object
-
- org.forgerock.openam.radius.common.RequestAuthenticator
-
- All Implemented Interfaces:
Authenticator
public class RequestAuthenticator extends Object implements Authenticator
The Request Authenticator implementation as outlined in section 3 of RFC 2865. This class is used in both radius client functionality such as the RADIUS authentication module and in radius server functionality when receiving access-requests and then sending responses.
-
-
Constructor Summary
Constructors Constructor Description RequestAuthenticator(byte[] octets)Generates a request authenticator field consisting of the 16 octets from the on-the-wire form of a packet.RequestAuthenticator(SecureRandom rand, String secret)Generates a request authenticator field consisting of a 16 octet random number per section 3 of RFC 2865.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getOctets()Returns the contained on-the-wire bytes of the authenticator.
-
-
-
Constructor Detail
-
RequestAuthenticator
public RequestAuthenticator(SecureRandom rand, String secret) throws NoSuchAlgorithmException
Generates a request authenticator field consisting of a 16 octet random number per section 3 of RFC 2865.- Parameters:
rand- in instance of SecureRandom as the source of randomness.secret- the secret shared between a radius client and server.- Throws:
NoSuchAlgorithmException- if the MD5 algorithm is not available.
-
RequestAuthenticator
public RequestAuthenticator(byte[] octets)
Generates a request authenticator field consisting of the 16 octets from the on-the-wire form of a packet.- Parameters:
octets- the on-the-wire bytes.
-
-
Method Detail
-
getOctets
public byte[] getOctets()
Returns the contained on-the-wire bytes of the authenticator.- Specified by:
getOctetsin interfaceAuthenticator- Returns:
- the on-the-wire representation of this authenticator.
-
-