Virgil Security C++ SDK
|
Class implementing AccessTokenInterface in terms of Virgil JWT. More...
#include <Jwt.h>
Public Member Functions | |
Jwt (JwtHeaderContent headerContent, JwtBodyContent bodyContent, VirgilByteArray signatureContent) | |
Constructor. More... | |
const JwtHeaderContent & | headerContent () const |
Getter. More... | |
const JwtBodyContent & | bodyContent () const |
Getter. More... | |
const VirgilByteArray & | signatureContent () const |
Getter. More... | |
const std::string & | stringRepresentation () const |
Provides string representation of token. More... | |
const std::string & | identity () const |
Extracts identity. More... | |
const VirgilByteArray & | dataToSign () const |
Returns JWT data that should be signed. More... | |
bool | isExpired (std::time_t date=std::time(0)) const |
Returns whether or not token is expired. More... | |
Public Member Functions inherited from virgil::sdk::jwt::interfaces::AccessTokenInterface | |
virtual | ~AccessTokenInterface ()=default |
Virtual destructor. | |
Static Public Member Functions | |
static Jwt | parse (const std::string &stringRepresentation) |
Initializes Jwt from its string representation. More... | |
static VirgilByteArray | dataToSign (const JwtHeaderContent &headerContent, const JwtBodyContent &bodyContent) |
Returns JWT data that should be signed. More... | |
Class implementing AccessTokenInterface in terms of Virgil JWT.
virgil::sdk::jwt::Jwt::Jwt | ( | JwtHeaderContent | headerContent, |
JwtBodyContent | bodyContent, | ||
VirgilByteArray | signatureContent | ||
) |
Constructor.
headerContent | JwtHeaderContent representing header of Jwt |
bodyContent | JwtBodyContent representing body of Jwt |
signatureContent | signature data of Jwt |
const JwtBodyContent& virgil::sdk::jwt::Jwt::bodyContent | ( | ) | const |
Getter.
const VirgilByteArray& virgil::sdk::jwt::Jwt::dataToSign | ( | ) | const |
Returns JWT data that should be signed.
|
static |
Returns JWT data that should be signed.
headerContent | JwtHeaderContent representing header of Jwt |
bodyContent | JwtBodyContent representing body of Jwt |
const JwtHeaderContent& virgil::sdk::jwt::Jwt::headerContent | ( | ) | const |
Getter.
|
virtual |
Extracts identity.
Implements virgil::sdk::jwt::interfaces::AccessTokenInterface.
bool virgil::sdk::jwt::Jwt::isExpired | ( | std::time_t | date = std::time(0) | ) | const |
Returns whether or not token is expired.
date | std::time with current date |
|
static |
const VirgilByteArray& virgil::sdk::jwt::Jwt::signatureContent | ( | ) | const |
Getter.
|
virtual |
Provides string representation of token.
Implements virgil::sdk::jwt::interfaces::AccessTokenInterface.