Class: StandardId::Api::WellKnown::JwksController
- Inherits:
-
ActionController::API
- Object
- ActionController::API
- StandardId::Api::WellKnown::JwksController
- Includes:
- ControllerPolicy
- Defined in:
- app/controllers/standard_id/api/well_known/jwks_controller.rb
Overview
Inherits from ActionController::API (not Api::BaseController) to avoid content-type validation and no-store cache headers — JWKS is a public, cacheable endpoint. Includes ControllerPolicy directly as a result.
Instance Method Summary collapse
Methods included from ControllerPolicy
all_controllers, authenticated_controllers, public_controllers, register, registry_snapshot, reset_registry!
Instance Method Details
#show ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/standard_id/api/well_known/jwks_controller.rb', line 13 def show jwks = StandardId::JwtService.jwks if jwks.nil? render json: { error: "JWKS not available" }, status: :not_found return end response.headers["Cache-Control"] = "public, max-age=3600" render json: jwks end |