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

The OCS class. More...

#include <ocs.h>

Public Member Functions

 OCS (bool adh)
 
string retrieveToken (const string &clientId, const string &clientSecret)
 Calls the OCS API to retrieve the authentication token related to the the clientId and clientSecret. More...
 
string extractToken (const string &response)
 Extracts the OCS token from the JSON returned by the OCS API. More...
 

Detailed Description

The OCS class.

Member Function Documentation

◆ extractToken()

std::string OCS::extractToken ( const string &  response)

Extracts the OCS token from the JSON returned by the OCS API.

Parameters
responseJSON message generated by the OCS API containing the OCS token
Returns
The OCS token to be used for authentication in API calls

◆ retrieveToken()

std::string OCS::retrieveToken ( const string &  clientId,
const string &  clientSecret 
)

Calls the OCS API to retrieve the authentication token related to the the clientId and clientSecret.

Parameters
clientIdClient Id code assigned by OCS using its GUI to the specific connection
clientSecretClient Secret code assigned by OCS using its gui to the specific connection
Returns
The OCS token to be used for authentication in API calls

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