Package io.jans.fido2.service.readiness
Class WellKnownFetchResult
java.lang.Object
io.jans.fido2.service.readiness.WellKnownFetchResult
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhy no response was obtained. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]body()The response body, cut at the size cap.TheContent-Typeheader, or null when absent or when there was no response.failure()booleanTrue when an HTTP response of any status was received.location()TheLocationheader of a 3xx response, reported as data only; null otherwise.intstatus()HTTP status, or 0 when there was no response.booleanTrue when the body was longer than the size cap and was cut.
-
Method Details
-
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
TheContent-Typeheader, or null when absent or when there was no response. -
location
TheLocationheader 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.
-