10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
IdToken.h
1#ifndef TENDUKE_OIDC_IDTOKEN_H
2#define TENDUKE_OIDC_IDTOKEN_H
3
4#include "jwt/JWT.h"
5
6namespace tenduke { namespace oidc {
7
9const std::string CLAIM_NONCE = "nonce";
10
15{
16public:
23 IdToken(
24 std::string serialized,
25 const std::map<std::string, std::string> &claims,
26 const std::map<std::string, std::string> &headerParameters = {},
27 const std::map<std::string, std::map<std::string, std::string>> &mapClaims = {}
28 );
34 IdToken(
35 std::string serialized,
37 );
38
43 const std::string & getNonce() const;
44
49 const std::string & getSerialized() const;
50
51
57 bool isNullToken() const;
58
63 static IdToken null();
64
65private:
66 const std::string serialized;
67};
68
69}}
70
71#endif //TENDUKE_OIDC_IDTOKEN_H
Very simple JWT implementation.
Definition JWT.h:32
std::map< std::string, std::map< std::string, std::string > > mapClaims
Claims with values of maps.
Definition JWT.h:176
std::map< std::string, std::string > headerParameters
Header parameters.
Definition JWT.h:174
std::map< std::string, std::string > claims
Claims.
Definition JWT.h:172
OIDC ID-token.
Definition IdToken.h:15
const std::string & getSerialized() const
Returns serialized representation of the ID-token.
Definition IdToken.cpp:30
const std::string & getNonce() const
Returns nonce.
Definition IdToken.cpp:24
bool isNullToken() const
Returns true, if token is a "null" token, i.e.
Definition IdToken.cpp:36
static IdToken null()
Returns "null" token token indicate that ID-token does not exist.
Definition IdToken.cpp:42
Support for JSON Web Tokens.
Definition DefaultJWTParser.h:11
const std::string CLAIM_NONCE
Claim name for nonce.
Definition IdToken.h:9
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4