Class responsible for JWT generation.
More...
#include <JwtGenerator.h>
Class responsible for JWT generation.
Constructor.
- Parameters
-
apiKey | Api Private Key for signing generated tokens. Can be taken here |
apiPublicKeyIdentifier | Public Key identifier of Api Key. Can be taken here |
crypto | std::shared_ptr to Crypto instance |
appId | Application Id. Can be taken here |
ttl | Lifetime of generated tokens |
Getter.
- Returns
- Api Private Key Generator uses for signing generated tokens
- Note
- Can be taken here
const std::string& virgil::sdk::jwt::JwtGenerator::apiPublicKeyIdentifier |
( |
| ) |
const |
Getter.
- Returns
- Public Key identifier of Api Key
- Note
- Can be taken here
const std::string& virgil::sdk::jwt::JwtGenerator::appId |
( |
| ) |
const |
Application Id.
- Returns
- Can be taken here
const std::shared_ptr<crypto::Crypto>& virgil::sdk::jwt::JwtGenerator::crypto |
( |
| ) |
const |
Getter.
- Returns
- std::shared_ptr to Crypto instance
Jwt virgil::sdk::jwt::JwtGenerator::generateToken |
( |
const std::string & |
identity, |
|
|
const std::unordered_map< std::string, std::string > & |
additionalData = std::unordered_map< std::string, std::string >() |
|
) |
| const |
Generates new JWT.
- Parameters
-
identity | std::string with identity to generate with |
additionalData | std::unordered_map with additional data |
- Returns
- generated and signed Jwt
int virgil::sdk::jwt::JwtGenerator::ttl |
( |
| ) |
const |
Getter.
- Returns
- Lifetime of generated tokens
The documentation for this class was generated from the following file: