Application may implement an application client class inheriting from OmmOAuth2ConsumerClient. In its own class, application needs to override callback methods it desires to use for item processing. Default empty callback methods are implemented by OmmOAuth2ConsumerClient class.
The following code snippet shows basic usage of OmmOAuth2ConsumerClient class to print recevied messages to screen.
{
};
void AppClient::onCredentialRenewal( const OmmConsumerEvent& event )
{
OAuth2CredentialRenewal credentials;
OmmConsumer& consumer = event.getClosure().getConsumer();
credentials.clientId("<CLIENT ID>");
credentials.clientSecret("<CLIENT_SECRET>");
consumer.SubmitOAuthCredentialRenewal(credentials);
}
virtual void onCredentialRenewal(const OmmConsumerEvent &consumerEvent)
OmmOAuth2ConsumerClient()
Definition at line 63 of file OmmOAuth2ConsumerClient.h.