|
static Try< JWT, JWTError > | parse (const std::string &token) |
| Parse an unsecured JWT. More...
|
|
static Try< JWT, JWTError > | parse (const std::string &token, const std::string &secret) |
| Parse a JWT and validate its HS256 signature. More...
|
|
static Try< JWT, JWTError > | parse (const std::string &token, std::shared_ptr< RSA > publicKey) |
| Parse a JWT and validate its RS256 signature. More...
|
|
static Try< JWT, JWTError > | create (const JSON::Object &payload) |
| Create an unsecured JWT. More...
|
|
static Try< JWT, JWTError > | create (const JSON::Object &payload, const std::string &secret) |
| Create a JWT with a HS256 signature. More...
|
|
static Try< JWT, JWTError > | create (const JSON::Object &payload, std::shared_ptr< RSA > privateKey) |
| Create a JWT with a RS256 signature. More...
|
|
A JSON Web Token (JWT) implementation.
- See also
- RFC 7519
This implementation supports the 'none', 'RS256' and 'HS256' algorithms. Header parameters other than 'alg' and 'typ' aren't parsed. To comply with RFC 7515, headers with 'crit' parameter are invalid. Currently, only the 'exp' standard claim is validated. Applications that need to validate other claims need to do this in their validation logic.