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

Class representing JWT Header content. More...

#include <JwtHeaderContent.h>

Public Member Functions

 JwtHeaderContent (std::string keyIdentifier, std::string algorithm="VEDS512", std::string type="JWT", std::string contentType="virgil-jwt;v=1")
 Constructor. More...
 
const std::string & algorithm () const
 Getter. More...
 
const std::string & type () const
 Getter. More...
 
const std::string & contentType () const
 Getter. More...
 
const std::string & keyIdentifier () const
 Getter. More...
 
std::string base64Url () const
 Exports JwtHeaderContent as base64Url encoded string. More...
 

Static Public Member Functions

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

Detailed Description

Class representing JWT Header content.

Constructor & Destructor Documentation

virgil::sdk::jwt::JwtHeaderContent::JwtHeaderContent ( std::string  keyIdentifier,
std::string  algorithm = "VEDS512",
std::string  type = "JWT",
std::string  contentType = "virgil-jwt;v=1" 
)

Constructor.

Parameters
keyIdentifieridentifier of public key which should be used to verify signature. Can be taken here
algorithmused signature algorithm
typetoken type
contentTypecontent type for this JWT

Member Function Documentation

const std::string& virgil::sdk::jwt::JwtHeaderContent::algorithm ( ) const

Getter.

Returns
used signature algorithm
std::string virgil::sdk::jwt::JwtHeaderContent::base64Url ( ) const

Exports JwtHeaderContent as base64Url encoded string.

Returns
base64Url encoded string with JwtHeaderContent
const std::string& virgil::sdk::jwt::JwtHeaderContent::contentType ( ) const

Getter.

Returns
content type for this JWT
const std::string& virgil::sdk::jwt::JwtHeaderContent::keyIdentifier ( ) const

Getter.

Returns
identifier of public key which should be used to verify signature
Note
Can be taken here
static JwtHeaderContent virgil::sdk::jwt::JwtHeaderContent::parse ( const std::string &  base64url)
static

Initializes JwtHeaderContent from base64Url encoded string.

Parameters
base64urlbase64Url encoded string with JwtHeaderContent
Returns
JwtHeaderContent instance
const std::string& virgil::sdk::jwt::JwtHeaderContent::type ( ) const

Getter.

Returns
token type

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