Class JwksResponse

java.lang.Object
com.revetsec.jose.JwksResponse

@Immutable public final class JwksResponse extends Object
An immutable HTTP response containing only public JWKS data. Emit its prepared status, headers and bytes together; in particular, a HEAD response has no body but describes the GET representation's length.
Since:
1.0.0
  • Method Details

    • getStatusCode

      Returns the prepared HTTP status.
      Returns:
      the status code
      Since:
      1.0.0
    • getHeaders

      Returns immutable HTTP header occurrences.
      Returns:
      the prepared headers
      Since:
      1.0.0
    • toHttpBody

      public byte @NonNull [] toHttpBody()
      Returns a defensive copy of the prepared public response body.
      Returns:
      the body, empty for HEAD, 304 and method/header rejections
      Since:
      1.0.0
    • getDocument

      Returns the immutable public document when this response has a GET body. This is an explicit public-key document emission; diagnostics remain redacted. The prepared headers describe toHttpBody(), so an application that serializes this document itself must calculate its own representation length and validator.
      Returns:
      the document, absent for HEAD, 304 and method/header rejections
      Since:
      1.0.0
    • toString

      Returns a description without keys or header contents.
      Overrides:
      toString in class Object
      Returns:
      the diagnostic description
      Since:
      1.0.0