Virgil Security C++ SDK
Public Member Functions | Static Public Attributes | List of all members
virgil::sdk::client::CardClient Class Reference

Virgil implementation of CardClientInterface. More...

#include <CardClient.h>

Inheritance diagram for virgil::sdk::client::CardClient:
virgil::sdk::client::CardClientInterface

Public Member Functions

 CardClient (std::string serviceUrl="https://api.virgilsecurity.com")
 Constructor. More...
 
const std::string & serviceUrl () const
 Getter. More...
 
std::future< models::RawSignedModelpublishCard (const models::RawSignedModel &model, const std::string &token) const override
 Creates Virgil Card instance on the Virgil Cards Service. Also makes the Card accessible for search/get queries from other users. RawSignedModel should contain appropriate signatures. More...
 
std::future< models::GetCardResponsegetCard (const std::string &cardId, const std::string &token) const override
 Returns GetCardResponse with RawSignedModel of card from the Virgil Cards Service with given ID, if exists. More...
 
std::future< std::vector< models::RawSignedModel > > searchCards (const std::string &identity, const std::string &token) const override
 Performs search of Virgil Cards using given identity on the Virgil Cards Service. More...
 
- Public Member Functions inherited from virgil::sdk::client::CardClientInterface
virtual ~CardClientInterface ()=default
 Virtual destructor.
 

Static Public Attributes

static const std::string xVirgilIsSuperseededKey
 HTTP header key for getCard response that marks outdated cards.
 

Detailed Description

Virgil implementation of CardClientInterface.

Constructor & Destructor Documentation

virgil::sdk::client::CardClient::CardClient ( std::string  serviceUrl = "https://api.virgilsecurity.com")

Constructor.

Parameters
serviceUrlstd::string with URL of service client will use

Member Function Documentation

std::future<models::GetCardResponse> virgil::sdk::client::CardClient::getCard ( const std::string &  cardId,
const std::string &  token 
) const
overridevirtual

Returns GetCardResponse with RawSignedModel of card from the Virgil Cards Service with given ID, if exists.

Parameters
cardIdstd::string with unique Virgil Card identifier
tokenstd::string with AccessTokenInterface implementation
Returns
std::future with GetCardResponse if Card found

Implements virgil::sdk::client::CardClientInterface.

std::future<models::RawSignedModel> virgil::sdk::client::CardClient::publishCard ( const models::RawSignedModel model,
const std::string &  token 
) const
overridevirtual

Creates Virgil Card instance on the Virgil Cards Service. Also makes the Card accessible for search/get queries from other users. RawSignedModel should contain appropriate signatures.

Parameters
modelsigned RawSignedModel to publish
tokenstd::string with AccessTokenInterface implementation
Returns
std::future with RawSignedModel of published Card

Implements virgil::sdk::client::CardClientInterface.

std::future<std::vector<models::RawSignedModel> > virgil::sdk::client::CardClient::searchCards ( const std::string &  identity,
const std::string &  token 
) const
overridevirtual

Performs search of Virgil Cards using given identity on the Virgil Cards Service.

Parameters
identityidentity of cards to search
tokenstd::string with AccessTokenInterface implementation
Returns
std::future with std::vector with RawSignedModels of matched Virgil Cards

Implements virgil::sdk::client::CardClientInterface.

const std::string& virgil::sdk::client::CardClient::serviceUrl ( ) const

Getter.

Returns
std::string with URL of service client use

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