The OCS class.
More...
#include <ocs.h>
|
| OCS (const std::string &authorizationUrl) |
|
std::string | OCSRetrieveAuthToken (const string &clientId, const string &clientSecret, bool logMessage=true) |
| Calls the ADH API to retrieve the authentication token. More...
|
|
int | retrieveToken (const string &clientId, const string &clientSecret, bool logMessage=true) |
| Calls the OCS/ADH API to retrieve the authentication token related to the the clientId and clientSecret. More...
|
|
void | extractToken (const string &response) |
| Extracts the OCS token from the JSON returned by the OCS API. More...
|
|
◆ extractToken()
void OCS::extractToken |
( |
const string & |
response | ) |
|
Extracts the OCS token from the JSON returned by the OCS API.
- Parameters
-
response | JSON message generated by the OCS API containing the OCS token |
◆ OCSRetrieveAuthToken()
string OCS::OCSRetrieveAuthToken |
( |
const string & |
clientId, |
|
|
const string & |
clientSecret, |
|
|
bool |
logMessage = true |
|
) |
| |
Calls the ADH API to retrieve the authentication token.
- Parameters
-
logMessage | If true, log error messages (default: true) |
- Returns
- token Authorization token
◆ retrieveToken()
int OCS::retrieveToken |
( |
const string & |
clientId, |
|
|
const string & |
clientSecret, |
|
|
bool |
logMessage = true |
|
) |
| |
Calls the OCS/ADH API to retrieve the authentication token related to the the clientId and clientSecret.
- Parameters
-
clientId | Client Id code assigned by OCS/ADH using its GUI to the specific connection |
clientSecret | Client Secret code assigned by OCS/ADH using its GUI to the specific connection |
logMessage | If true, log error messages (default: true) |
- Returns
- HTTP Code
The documentation for this class was generated from the following files:
- C/plugins/north/OMF/include/ocs.h
- C/plugins/north/OMF/ocs.cpp