Class WellKnownFetchResult

java.lang.Object
io.jans.fido2.service.readiness.WellKnownFetchResult

public final class WellKnownFetchResult extends Object
What WellKnownFetcher got back from a relying party's server.

Either a WellKnownFetchResult.Failure (nothing usable came back) or an HTTP response. A redirect is a response: its status and Location are reported as data and never followed. Failures are coarse on purpose, so that a caller cannot use them to probe what is reachable from the server's network.

  • Method Details

    • failure

      public WellKnownFetchResult.Failure failure()
    • hasResponse

      public boolean hasResponse()
      True when an HTTP response of any status was received.
    • status

      public int status()
      HTTP status, or 0 when there was no response.
    • contentType

      public String contentType()
      The Content-Type header, or null when absent or when there was no response.
    • location

      public String location()
      The Location header of a 3xx response, reported as data only; null otherwise.
    • body

      public byte[] body()
      The response body, cut at the size cap. Empty when there was no response.
    • truncated

      public boolean truncated()
      True when the body was longer than the size cap and was cut.