Configuring API Authentication In The Integration Framework

The Integration Framework project provides a function that passes the authentication input from the Connection dialog to the API. Depending on the API you are accessing, you may need to make changes to the function. If you have made changes to the fields on the Connection dialog, you must add those changes to the authentication function to make sure they are passed to the API. See Defining The Integration Framework Connection Form for information on adding fields to the Connection dialog that displays in TIBCO Scribe®.

Review the examples below to determine how to configure Authentication for your Connector. See Validating Connection Credentials In The Integration Framework for information on testing a connection.

Masking Attribute

If you have opted to mask a field so that customer input is hidden with asterisks or dots, use the [PasswordPropertyText(true)] attribute. This uses the crypto key or GUID from the Integration Framework Wizard to encrypt the value entered on the Connection dialog. See the example below for the settings used to mask the SpecialToken and Password fields.

Any string set to Password is masked by default regardless of the case of the letters, but the setting is shown for illustration purposes. If you want to display the contents of a field that is masked, set the attribute to false: [PasswordPropertyText(false)]

public string BaseUrl { get; set; }

public string APIKey { get; set; }

public string UserName { get; set; }

[PasswordPropertyText(true)]

public string SpecialToken { get; set; }

[PasswordPropertyText(true)]

public string Password { get; set; }

Basic

return this.Connection.ConfigureWithBasicAuth("GET", (form) => form.BaseUrl, this.Username, this.Password).End();

OAuth Token

return this.Connection.Configure("GET", connInfo => connInfo.BaseUrl + "/EnterConnectionUrlHere")

.ConnectionInfoToBaseUrl(info => info.BaseUrl) // Set the BaseUrl for subsequent calls

.ToHeader("oauth_token", this.AccessToken) // Put the AccessToken in the right place

.End(); // Finish the configuration

URL

This option allows you to add authentication information to the Base URL.

return this.Connection.Configure("GET", connInfo => connInfo.BaseUrl + "/EnterConnectionUrlHere")

.ConnectionInfoToBaseUrl(info => info.BaseUrl) // Set the BaseUrl for subsequent calls

.ToQuery("username", this.UserName)

.ToQuery("pw", this.Password)

.End(); // Finish the configuration

See Also

Fast Connector Framework (FCF)