Module: Verikloak::MiddlewareErrorMapping Private
- Included in:
- Middleware
- Defined in:
- lib/verikloak/middleware.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Internal mixin that encapsulates error-to-HTTP mapping logic used by Middleware. By extracting this mapping into a separate module, the middleware class stays concise and easier to reason about.
This module does not depend on Rack internals; it only interprets Verikloak error objects and their ‘code` attributes.
Constant Summary collapse
- AUTH_ERROR_CODES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Set of token/client-side error codes that should map to **401 Unauthorized**.
%w[ invalid_token expired_token not_yet_valid invalid_issuer invalid_audience invalid_signature unsupported_algorithm missing_authorization_header invalid_authorization_header ].freeze
- INFRA_ERROR_CODES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Set of middleware/infrastructure error codes that should map to **503 Service Unavailable**.
%w[jwks_fetch_failed jwks_cache_miss].freeze