Class ServletJwks
java.lang.Object
com.revetsec.servlet.javax.ServletJwks
Publishes standalone public JSON Web Key Sets on application-owned Servlet routes.
The core publisher prepares method handling, conditional responses, cache headers and JSON bytes.
Applications choose the route and its key set; no OAuth authorization server is required.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidwriteResponse(@NonNull JwksPublisher publisher, @NonNull HttpServletRequest request, @NonNull HttpServletResponse response) Prepares and writes a standalone JWKS response using everyIf-None-Matchoccurrence.static voidwriteResponse(@NonNull HttpServletResponse response, @NonNull JwksResponse prepared) Writes a prepared core response without JSON marshalling or header regeneration.
-
Method Details
-
writeResponse
public static void writeResponse(@NonNull JwksPublisher publisher, @NonNull HttpServletRequest request, @NonNull HttpServletResponse response) throws IOException Prepares and writes a standalone JWKS response using everyIf-None-Matchoccurrence. Servlet header lookup is case-insensitive and retains repeated physical field values.- Parameters:
publisher- configured public-key publisherrequest- request on the application's JWKS routeresponse- application-owned transport response- Throws:
NullPointerException- if a required argument is nullIllegalStateException- if the Servlet does not expose request headersIOException- if the Servlet output stream fails- Since:
- 1.0.0
-
writeResponse
public static void writeResponse(@NonNull HttpServletResponse response, @NonNull JwksResponse prepared) throws IOException Writes a prepared core response without JSON marshalling or header regeneration. A prepared HEAD or not-modified response does not obtain or write the output stream.- Parameters:
response- application-owned transport responseprepared- prepared standalone JWKS response- Throws:
NullPointerException- if a required argument is nullIOException- if the Servlet output stream fails- Since:
- 1.0.0
-