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

Class responsible for verification of JWTs. More...

#include <JwtVerifier.h>

Public Member Functions

 JwtVerifier (crypto::keys::PublicKey apiPublicKey, std::string apiPublicKeyIdentifier, std::shared_ptr< crypto::Crypto > crypto)
 Constructor. More...
 
bool verifyToken (const Jwt &token) const
 Verifies Jwt signature. More...
 
const crypto::keys::PublicKeyapiPublicKey () const
 Getter. More...
 
const std::string & apiPublicKeyIdentifier () const
 Getter. More...
 
const std::shared_ptr< crypto::Crypto > & crypto () const
 Getter. More...
 

Detailed Description

Class responsible for verification of JWTs.

Constructor & Destructor Documentation

virgil::sdk::jwt::JwtVerifier::JwtVerifier ( crypto::keys::PublicKey  apiPublicKey,
std::string  apiPublicKeyIdentifier,
std::shared_ptr< crypto::Crypto crypto 
)

Constructor.

Parameters
apiPublicKeyPublic Key which should be used to verify signatures
apiPublicKeyIdentifieridentifier of public key which should be used to verify signatures
cryptostd::shared_ptr to Crypto instance

Member Function Documentation

const crypto::keys::PublicKey& virgil::sdk::jwt::JwtVerifier::apiPublicKey ( ) const

Getter.

Returns
Public Key which Verifier uses to verify signatures
const std::string& virgil::sdk::jwt::JwtVerifier::apiPublicKeyIdentifier ( ) const

Getter.

Returns
identifier of public key which Verifier uses to verify signatures
const std::shared_ptr<crypto::Crypto>& virgil::sdk::jwt::JwtVerifier::crypto ( ) const

Getter.

Returns
std::shared_ptr to Crypto instance
bool virgil::sdk::jwt::JwtVerifier::verifyToken ( const Jwt token) const

Verifies Jwt signature.

Parameters
tokenJwt to be verified
Returns
true if token is verified, false otherwise

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