template<typename Clock, typename json_traits>
class jwt::verifier< Clock, json_traits >
Verifier class used to check if a decoded token contains all claims required by your application and has a valid signature.
Definition at line 3598 of file jwt.h.
template<typename Clock , typename json_traits >
Verification function data structure.
This gets passed the current verifier, a reference to the decoded jwt, a reference to the key of this claim, as well as a reference to an error_code. The function checks if the actual value matches certain rules (e.g. equality to value x) and sets the error_code if it does not. Once a non zero error_code is encountered the verification stops and this error_code becomes the result returned from verify
Definition at line 3610 of file jwt.h.
template<typename Clock , typename json_traits >
template<typename Algorithm >
Add an algorithm available for checking.
This is used to handle incomming tokens for predefined algorithms which the authorization server is provided. For example a small system where only a single RSA key-pair is used to sign tokens
- Template Parameters
-
- Parameters
-
- Returns
- *this to allow chaining
Definition at line 3811 of file jwt.h.
template<typename Clock , typename json_traits >
| verifier & jwt::verifier< Clock, json_traits >::with_type |
( |
const typename json_traits::string_type & |
type, |
|
|
std::locale |
locale = std::locale{} |
|
) |
| |
|
inline |
Set an type to check for.
According to RFC 7519 Section 5.1, This parameter is ignored by JWT implementations; any processing of this parameter is performed by the JWT application. Check is case sensitive.
- Parameters
-
| type | Type Header Parameter to check for. |
| locale | Localization functionality to use when comparing |
- Returns
- *this to allow chaining
Definition at line 3715 of file jwt.h.