Class JwksMarshaledResponse

java.lang.Object
com.revetsec.soklet.JwksMarshaledResponse

@ThreadSafe public final class JwksMarshaledResponse extends Object
Publishes standalone public JSON Web Key Sets as prepared Soklet responses. The core publisher's exact bytes, strong entity tag and prepared content length are retained. Soklet's default marshaler supports this variant, including HEAD. Applications choose the route and its keys; no OAuth authorization server is required. For a typed body and application-owned JSON serialization, use JwksResponse instead.
Since:
1.0.0
  • Method Details

    • from

      @CheckReturnValue public static @NonNull MarshaledResponse from(@NonNull JwksPublisher publisher, @NonNull Request request)
      Prepares a standalone JWKS response using every If-None-Match occurrence. HEAD responses are bodyless and retain the core publisher's GET representation length.
      Parameters:
      publisher - configured public-key publisher
      request - request on the application's JWKS route
      Returns:
      prepared status, headers and exact body bytes in a Soklet response
      Throws:
      NullPointerException - if a required argument is null
      Since:
      1.0.0
    • from

      @CheckReturnValue public static @NonNull MarshaledResponse from(@NonNull JwksResponse response)
      Adapts a prepared core response without JSON marshalling or header regeneration. A prepared HEAD or not-modified response has no body; its headers are retained unchanged.
      Parameters:
      response - prepared standalone JWKS response
      Returns:
      exact-byte Soklet response
      Throws:
      NullPointerException - if response is null
      Since:
      1.0.0