Class JwksResponse

java.lang.Object
com.revetsec.soklet.JwksResponse

@ThreadSafe public final class JwksResponse extends Object
Prepares logical public JSON Web Key Set responses on application-owned Soklet routes. Applications choose the route and its key set; no OAuth authorization server is required. from(JwksPublisher, Request) returns a Soklet response with a typed JwksResponse.Body for application-owned JSON serialization, weak entity tags and no prepared content length. For prepared bytes and Soklet's default marshaler, use JwksMarshaledResponse instead.
Since:
1.0.0
  • Method Details

    • from

      @CheckReturnValue public static @NonNull Response from(@NonNull JwksPublisher publisher, @NonNull Request request)
      Prepares a logical JWKS response for application-owned JSON serialization. A successful GET has an immutable JwksResponse.Body; HEAD, not-modified responses and rejections have no body. Entity tags are weak document fingerprints. No content length is supplied, because the application's marshaler chooses the encoded representation. Other prepared headers are retained. The default Soklet marshaler uses diagnostic toString() output for arbitrary objects; applications must configure their JSON marshaler to serialize JwksResponse.Body.toJsonObject() or JwksResponse.Body.toJson().
      Parameters:
      publisher - configured public-key publisher
      request - request on the application's JWKS route
      Returns:
      logical response whose body is ready for application serialization or structural assertions
      Throws:
      NullPointerException - if a required argument is null
      Since:
      1.0.0