|
Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
|
Verification settings for jwt_auth(). Configure at least one key: secret, public_key_pem or jwks_url (several may be combined).
More...
#include <JwtAuth.hpp>
Public Attributes | |
| std::string | secret |
| std::string | public_key_pem |
| std::string | jwks_url |
| std::chrono::seconds | jwks_refresh {3600} |
| Refetch the key set at least this often. | |
| std::chrono::seconds | jwks_min_refetch {30} |
| Minimum gap between fetches (bounds load from bogus kids) | |
| std::chrono::seconds | jwks_timeout {5} |
| Timeout for one JWKS request. | |
| std::string | issuer |
| If set, the "iss" claim must equal it. | |
| std::string | audience |
| If set, "aud" (string or array) must contain it. | |
| bool | require_exp = false |
| Reject tokens without an "exp" claim. | |
| std::chrono::seconds | leeway {0} |
| Clock skew tolerated for "exp" and "nbf". | |
Verification settings for jwt_auth(). Configure at least one key: secret, public_key_pem or jwks_url (several may be combined).
| std::string orbit::middleware::JwtOptions::audience |
If set, "aud" (string or array) must contain it.
| std::string orbit::middleware::JwtOptions::issuer |
If set, the "iss" claim must equal it.
| std::chrono::seconds orbit::middleware::JwtOptions::jwks_min_refetch {30} |
Minimum gap between fetches (bounds load from bogus kids)
| std::chrono::seconds orbit::middleware::JwtOptions::jwks_refresh {3600} |
Refetch the key set at least this often.
| std::chrono::seconds orbit::middleware::JwtOptions::jwks_timeout {5} |
Timeout for one JWKS request.
| std::string orbit::middleware::JwtOptions::jwks_url |
RS256/ES256 keys published as a JSON Web Key Set, e.g. "https://issuer.example.com/.well-known/jwks.json". The token's "kid" selects the key; an unknown kid triggers a refetch (key rotation).
| std::chrono::seconds orbit::middleware::JwtOptions::leeway {0} |
Clock skew tolerated for "exp" and "nbf".
| std::string orbit::middleware::JwtOptions::public_key_pem |
RS256 or ES256: a PEM public key ("-----BEGIN PUBLIC KEY-----"). The key type decides the algorithm: RSA (>= 2048 bits) means RS256, EC P-256 means ES256.
| bool orbit::middleware::JwtOptions::require_exp = false |
Reject tokens without an "exp" claim.
| std::string orbit::middleware::JwtOptions::secret |
HS256: HMAC-SHA256 key