EMA C++ Configuration Guide : 4 Enterprise Message API Configuration Processing : 4.4 Configuring the Enterprise Message API Using Function Calls : 4.4.4 Multi-Credential Configuration : 4.4.4.1 OAuth2Credential Class Functions
 
4.4.4.1 OAuth2Credential Class Functions
You can use the following class functions:
 
Table 36: OAuth2Credential Class Functions 
function
description
channelList(const EmaString&)
Comma separated list of channel names that should be used with these credentials. If this is set to a blank EMAString, these credentials will be used by any channels that have Session Management turned on and are not explicitly specified by other credentials channelList.
clear()
Zeroes out any sensitive data strings and clears out the members in the class.
clientId(const EmaString&)
Required. Specifies an authentication parameter.
Version 2 Authentication: a unique ID provisioned as part of Service Account used to make an authentication request.
Version 1 Authentication: a unique ID for application used to make an authentication request.
clientSecret(const EmaString&)
Sets the client secret.
Optional for Version 1 oAuthPasswordGrant authentication.
Required for Version 2 oAuthClientCredential authentication and provisioned as part of Service Account.
const EmaString& getChannelList()
Gets the channelList. This is optionally used for login V1 and login V2.
const EmaString& getClientId()
Gets the clientId. This is used for login V1 and login V2.
const EmaString& getClientSecret()
Gets the clientSecret. This is used for login V2.
const EmaString& getPassword()
Gets the password. This is only used for login V1.
const bool getTakeExclusiveSignOnControl()
Specifies the takeExclusiveSignOnControl feature. This is optionally used for login V1.
const EmaString& getTokenScope()
Gets the tokenScope. This is optionally used for login V1 and login V2.
const EmaString& getUserName()
Gets the user name. This is only used for login V1.
password(const EmaString&)
Required for Version 1 oAuthPasswordGrant authentication. Specifies the password used together with the username to obtain the access token.
tokenScope(const EmaString&)
Optional for Version 1 and Version 2 authentication. Specifies token scope to override the default for limiting the scope of generated token from the token service. Defaults to “trapi.streaming.pricing.read”.
takeExclusiveSignOnControl(bool)
Optional. Only used for Version 1 authentication. Specifies exclusive sign-on control to force sign-out of other applications using the same credentials. Default value is “True”.
userName(const EmaString&)
Required for Version 1 oAuthPasswordGrant authentication. Specifies the username used to obtain the authentication token from the Delivery Platform and provisioned with Machine Account.