Class ChallengeWriter

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class ChallengeWriter extends HeaderWriter<ChallengeRequest>
Authentication challenge header writer.
Author:
Jerome Louvel
  • Constructor Details

    • ChallengeWriter

      public ChallengeWriter()
      Constructor.
  • Method Details

    • append

      Description copied from class: HeaderWriter
      Appends a value.
      Specified by:
      append in class HeaderWriter<ChallengeRequest>
      Parameters:
      value - The value.
      Returns:
      This writer.
    • appendChallengeParameter

      public ChallengeWriter appendChallengeParameter(Parameter parameter)
      Appends a new challenge parameter, prefixed with a comma. The value is separated from the name by an '=' character.
      Parameters:
      parameter - The parameter.
      Returns:
      This writer.
    • appendChallengeParameter

      public ChallengeWriter appendChallengeParameter(String name)
      Appends a new parameter, prefixed with a comma.
      Parameters:
      name - The parameter name.
      Returns:
      The current builder.
    • appendChallengeParameter

      public ChallengeWriter appendChallengeParameter(String name, String value)
      Appends a new parameter, prefixed with a comma. The value is separated from the name by an '=' character.
      Parameters:
      name - The parameter name.
      value - The parameter value.
      Returns:
      This writer.
    • appendChallengeParameterSeparator

      public ChallengeWriter appendChallengeParameterSeparator()
      Appends a comma as a separator if the first parameter has already been written.
      Returns:
      This writer.
    • appendQuotedChallengeParameter

      public ChallengeWriter appendQuotedChallengeParameter(Parameter parameter)
      Appends a new parameter, prefixed with a comma. The value is separated from the name by an '=' character.
      Parameters:
      parameter - The parameter.
      Returns:
      This writer.
    • appendQuotedChallengeParameter

      public ChallengeWriter appendQuotedChallengeParameter(String name, String value)
      Appends a new parameter, prefixed with a comma. The value is quoted and separated from the name by an '=' character.
      Parameters:
      name - The parameter name.
      value - The parameter value to quote.
      Returns:
      This writer.
    • isFirstChallengeParameter

      public boolean isFirstChallengeParameter()
      Indicates if the first comma-separated value is written.
      Returns:
      True if the first comma-separated value is written.
    • setFirstChallengeParameter

      public void setFirstChallengeParameter(boolean firstValue)
      Indicates if the first comma-separated value is written.
      Parameters:
      firstValue - True if the first comma-separated value is written.