tibemsAdmin_CreateWithOAuth2Params

Function

Purpose

Create an administration connection to an EMS server that is configured for OAuth 2.0 authentication. Obtain OAuth 2.0 access tokens using the parameters set in the oauth2Params object.

C Declaration

tibems_status tibemsAdmin_CreateWithOAuth2Params(
    tibemsAdmin* admin,
    const char* url,
    const char* userName,
    const char* password,
    tibemsSSLParams sslParams,
    tibemsOAuth2Params oauth2Params );

IBM Systems

This function is not supported in COBOL, and on z/OS and IBM i systems.

Parameters

Parameter Description
admin Store the new administrative connection in this location.
url Find the EMS server at this URL.
userName

The username to use when requesting an access token from the OAuth 2.0 authorization server using the resource owner password credential grant.

If this parameter is null, the client credentials grant will be used instead.

password

The password to use when requesting an access token from the OAuth 2.0 authorization server using the resource owner password credential grant.

sslParams

Establish TLS communication using these parameters.

See TLS server parameters in the TIBCO Enterprise Message Service User Guide for more information.

oauth2Params

Use the parameters configured in this object to obtain OAuth 2.0 access tokens.

Remarks

When an administration connection is created via this function, it checks the parameters in the oauth2Params object to determine the method by which OAuth 2.0 access tokens will be obtained for authentication with the EMS server. If the object contains a configured access token, it is directly used. Otherwise, if the object contains a user-defined callback, the connection will invoke it whenever it requires access tokens. If neither of these are present, the parameters in the object are used to contact an OAuth 2.0 authorization server to request access tokens via an OAuth 2.0 grant. The grant type used to request the access tokens depends on the value of the userName parameter. If the userName parameter is null, the client credentials grant type is used. Otherwise, the userName and password parameter values are used to request access tokens via the resource owner password credentials grant type.

See Also

tibemsOAuth2Params

tibemsOAuth2Params_SetTokenFetchCallback