Fledge
An open source edge computing platform for industrial users
BearerToken Class Reference

This class represents a JWT bearer token. More...

#include <bearer_token.h>

Public Member Functions

 BearerToken (std::shared_ptr< SimpleWeb::Server< SimpleWeb::HTTP >::Request > request)
 
 BearerToken (std::string &token)
 BearerToken constructor with string reference. More...
 
bool exists ()
 
const std::string & token ()
 
bool verify (const std::string &serverResponse)
 BearerToken verification from JSON string reference. More...
 
unsigned long getExpiration ()
 
const std::string & getAudience ()
 
const std::string & getSubject ()
 
const std::string & getIssuer ()
 

Detailed Description

This class represents a JWT bearer token.

The claims are stored after verification to core service API endpoint

Constructor & Destructor Documentation

◆ BearerToken()

BearerToken::BearerToken ( std::string &  token)

BearerToken constructor with string reference.

Parameters
tokenBearer token string

Member Function Documentation

◆ verify()

bool BearerToken::verify ( const std::string &  serverResponse)

BearerToken verification from JSON string reference.

Known token claims as stored as strings

Parameters
responseJSON string from token verification endpoint
Returns
True on success False otherwise

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