Auth
Authorization is used to communicate with private blockchains
Creating an auth instance
To create an auth instance do the following:
#include "ULC.hpp"
using namespace ULC;
using namespace ULC::AUTH;
// Create the auth instance
UL_Auth auth{};
auth.SetCertFilePath("cacert.pem"); // This is your certificate file included with ULC.
auth.SetBearer("My JWT Token"); // For use with private blockchains.
auth.SetApiKey("My api key"); // Interchangeable with the bearer, but this allows explicitly setting a key for an api.
info
The cacert file is only needed when experiencing unathenticated curl calls for Get and Post functionality.