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 from an OAuth 2.0 authorization server, or use a configured access token.

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

Obtain the configured access token from this object if available. Otherwise use the parameters in this object to request OAuth 2.0 access tokens from the OAuth 2.0 authorization server.

Remarks

Either this function or tibemsAdmin_CreateWithOAuth2TokenFetchCallback can be used to create an administration connection to an EMS server configured with OAuth 2.0 authentication.

When an administration connection is created via this function, it checks the parameters in oauth2Params for a configured access token and uses it for authentication with the EMS server if available. Otherwise it uses the parameters in oauth2Params to directly contact an OAuth 2.0 authorization server to request the OAuth 2.0 access tokens needed to authenticate with the EMS server. 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

tibemsAdmin_CreateWithOAuth2TokenFetchCallback