10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
JWK.h
1
#ifndef TENDUKE_JWK_JWK_H
2
#define TENDUKE_JWK_JWK_H
3
4
#include "../crypto/asymmetric/PublicKey.h"
5
#include "../crypto/msgauthn/HashAlgorithm.h"
6
7
#include <memory>
8
#include <string>
9
10
namespace
tenduke
{
namespace
jwk
{
11
17
class
JWK
{
18
public
:
27
JWK
(
28
std::string
id
,
29
std::string
type
,
30
const
std::shared_ptr<const tenduke::crypto::PublicKey> &
key
,
31
std::string
use
=
""
,
32
std::string
alg
=
""
33
);
34
41
bool
isUsableForSignature
(
::tenduke::crypto::HashAlgorithm
algorithm)
const
;
42
44
const
std::string
id
;
46
const
std::string
type
;
48
const
std::shared_ptr<const tenduke::crypto::PublicKey>
key
;
50
const
std::string
use
;
52
const
std::string
alg
;
53
61
static ::tenduke::crypto::HashAlgorithm
mapFromJWTAlgorithm
(
const
std::string &jwtAlgorithm);
62
};
63
64
}}
65
66
#endif
//TENDUKE_JWK_JWK_H
tenduke::jwk::JWK::use
const std::string use
Intended use of the key, JWK property "use".
Definition
JWK.h:50
tenduke::jwk::JWK::isUsableForSignature
bool isUsableForSignature(::tenduke::crypto::HashAlgorithm algorithm) const
Checks if the key can be used to verify signatures made with given algorithm: The key must not be mea...
Definition
JWK.cpp:23
tenduke::jwk::JWK::JWK
JWK(std::string id, std::string type, const std::shared_ptr< const tenduke::crypto::PublicKey > &key, std::string use="", std::string alg="")
Constructs new instance.
Definition
JWK.cpp:10
tenduke::jwk::JWK::key
const std::shared_ptr< const tenduke::crypto::PublicKey > key
Parsed key representation.
Definition
JWK.h:48
tenduke::jwk::JWK::id
const std::string id
Id of the key, JWK property "kid".
Definition
JWK.h:44
tenduke::jwk::JWK::alg
const std::string alg
Algorithm intended for use with the key, JWK property "alg".
Definition
JWK.h:52
tenduke::jwk::JWK::type
const std::string type
Type of the key, JWK property "kty".
Definition
JWK.h:46
tenduke::jwk::JWK::mapFromJWTAlgorithm
::tenduke::crypto::HashAlgorithm mapFromJWTAlgorithm(const std::string &jwtAlgorithm)
Maps JSON Web Token algorithm (alg) to Algorithm.
Definition
JWK.cpp:32
tenduke::crypto::HashAlgorithm
HashAlgorithm
Currently supported hash algorithms.
Definition
HashAlgorithm.h:13
tenduke::jwk
Support for JSON Web Keys.
Definition
DynamicJWKSSignatureValidator.h:13
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
core
core
src
jwk
JWK.h
Generated by
1.17.0