Record Class FilePreparationRequest

java.lang.Object
java.lang.Record
com.digicert.validation.methods.file.prepare.FilePreparationRequest
Record Components:
domain - the domain for which the file validation preparation is requested

This field specifies the domain name that is the subject of the file validation request. The domain name must be a valid fully qualified domain name (FQDN).

filename - the filename where the challenge value will be stored and queried on the server

This field specifies the filename where the challenge value will be stored and queried on the server. The file must be placed in the /.well-known/pki-validation/ directory of the domain's web server. This field is optional, and will default to the value configured in DcvConfiguration if not provided.

challengeType - the type of challenge to use for validation

This field indicates the type of challenge that will be used in the file validation process. The challenge type is either RANDOM_VALUE or REQUEST_TOKEN. The RANDOM_VALUE challenge type requires the customer to use a CA-generated random value, while the REQUEST_TOKEN challenge type requires the customer to use a request token generated themselves according to the CA's specifications.


public record FilePreparationRequest(String domain, String filename, ChallengeType challengeType) extends Record
Represents a request for file validation preparation.

This class encapsulates the details required to prepare for file validation. File validation is a method used to verify the ownership or control of a domain by placing a specific file at a predetermined location on the domain's web server. The FilePreparationRequest class includes the domain for which the authentication is being prepared, the type of challenge used for validation, and an optional filename if the default will not be used.

  • Field Details

    • domain

      private final String domain
      The field for the domain record component.
    • filename

      private final String filename
      The field for the filename record component.
    • challengeType

      private final ChallengeType challengeType
      The field for the challengeType record component.
  • Constructor Details

    • FilePreparationRequest

      public FilePreparationRequest(String domain)
      Constructs a new FilePreparationRequest with the specified domain and a default challenge type of RANDOM_VALUE.

      This constructor initializes a new instance of FilePreparationRequest using the provided domain name and sets the challenge type to RANDOM_VALUE by default. Using the REQUEST_TOKEN challenge type does not require any domain-specific data, so calling prepare for a domain name using RANDOM_VALUE is the most common use case for file validation preparation.

      Parameters:
      domain - the domain for which the file validation preparation is requested

      This field specifies the domain name that is the subject of the file validation request. The domain name must be a valid fully qualified domain name (FQDN).

    • FilePreparationRequest

      public FilePreparationRequest(String domain, String filename, ChallengeType challengeType)
      Creates an instance of a FilePreparationRequest record class.
      Parameters:
      domain - the value for the domain record component
      filename - the value for the filename record component
      challengeType - the value for the challengeType record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • domain

      public String domain()
      Returns the value of the domain record component.
      Returns:
      the value of the domain record component
    • filename

      public String filename()
      Returns the value of the filename record component.
      Returns:
      the value of the filename record component
    • challengeType

      public ChallengeType challengeType()
      Returns the value of the challengeType record component.
      Returns:
      the value of the challengeType record component