Virgil Security C++ SDK
Public Member Functions | Static Public Member Functions | List of all members
virgil::sdk::jwt::JwtBodyContent Class Reference

Class representing JWT Body content. More...

#include <JwtBodyContent.h>

Public Member Functions

 JwtBodyContent (std::string appId, std::string identity, std::time_t expiresAt, std::time_t issuedAt, std::unordered_map< std::string, std::string > additionalData=std::unordered_map< std::string, std::string >())
 Constructor. More...
 
const std::string & appId () const
 Getter. More...
 
const std::string & identity () const
 Getter. More...
 
std::time_t expiresAt () const
 Getter. More...
 
std::time_t issuedAt () const
 Getter. More...
 
const std::unordered_map< std::string, std::string > & additionalData () const
 Getter. More...
 
std::string base64Url () const
 Exports JwtBodyContent as base64Url encoded string. More...
 

Static Public Member Functions

static JwtBodyContent parse (const std::string &base64url)
 Initializes JwtBodyContent from a base64Url encoded std::string. More...
 

Detailed Description

Class representing JWT Body content.

Constructor & Destructor Documentation

virgil::sdk::jwt::JwtBodyContent::JwtBodyContent ( std::string  appId,
std::string  identity,
std::time_t  expiresAt,
std::time_t  issuedAt,
std::unordered_map< std::string, std::string >  additionalData = std::unordered_map< std::string, std::string >() 
)

Constructor.

Parameters
appIdstd::string with issuer containing application id. Can be taken here
identitystd::string with identity (must be equal to RawSignedModel identity when publishing card)
expiresAtstd::time with expiration date of token
issuedAtstd::time with issued date of token
additionalDatastd::unordered_map with additional data

Member Function Documentation

const std::unordered_map<std::string, std::string>& virgil::sdk::jwt::JwtBodyContent::additionalData ( ) const

Getter.

Returns
std::unordered_map with additional data
const std::string& virgil::sdk::jwt::JwtBodyContent::appId ( ) const

Getter.

Returns
std::string with issuer containing application id
Note
Can be taken here
std::string virgil::sdk::jwt::JwtBodyContent::base64Url ( ) const

Exports JwtBodyContent as base64Url encoded string.

Returns
base64Url encoded string with JwtBodyContent
std::time_t virgil::sdk::jwt::JwtBodyContent::expiresAt ( ) const

Getter.

Returns
std::time with expiration date of token
const std::string& virgil::sdk::jwt::JwtBodyContent::identity ( ) const

Getter.

Returns
std::string with identity
Note
must be equal to RawSignedModel identity when publishing card
std::time_t virgil::sdk::jwt::JwtBodyContent::issuedAt ( ) const

Getter.

Returns
std::time with issued date of token
static JwtBodyContent virgil::sdk::jwt::JwtBodyContent::parse ( const std::string &  base64url)
static

Initializes JwtBodyContent from a base64Url encoded std::string.

Parameters
base64urlbase64Url encoded std::string with JwtBodyContent
Returns
JwtBodyContent instance

The documentation for this class was generated from the following file: