Class AccessRequestChap

All Implemented Interfaces:
AttributeHolder<RadiusRequest>, NestedAttributeHolder<RadiusRequest>, RadiusPacket<RadiusRequest>, RadiusRequest, MessageAuthSupport<RadiusRequest>

public class AccessRequestChap extends AccessRequest
CHAP AccessRequest RFC2865
  • Constructor Details

  • Method Details

    • encodeRequest

      public RadiusRequest encodeRequest(String sharedSecret) throws RadiusPacketException
      Description copied from class: AccessRequest
      AccessRequest overrides this method to generate a randomized authenticator (RFC 2865) and encode required attributes (e.g. User-Password).
      Specified by:
      encodeRequest in interface RadiusRequest
      Overrides:
      encodeRequest in class AccessRequest
      Parameters:
      sharedSecret - shared secret that secures the communication with the other Radius server/client
      Returns:
      RadiusPacket with new authenticator and encoded attributes
      Throws:
      RadiusPacketException - if invalid or missing attributes
    • decodeRequest

      public RadiusRequest decodeRequest(String sharedSecret) throws RadiusPacketException
      Description copied from interface: RadiusRequest
      Decodes the request against the supplied shared secret.

      Must be idempotent.

      Specified by:
      decodeRequest in interface RadiusRequest
      Overrides:
      decodeRequest in class AccessRequest
      Parameters:
      sharedSecret - shared secret
      Returns:
      verified RadiusRequest with decoded attributes if appropriate
      Throws:
      RadiusPacketException - if authenticator check fails
    • checkPassword

      public boolean checkPassword(String password)
      Checks that the passed plain-text password matches the password (hash) send with this Access-Request packet.
      Parameters:
      password - plaintext password to verify packet against
      Returns:
      true if the password is valid, false otherwise