HTTP Client Authorization Configuration

You can set up the HTTP Client Authorization Configuration connection from the Connections tab to add authentication and authorization to your Flogo apps. To enable the connection you have set up, refer to the InvokeRESTService activity.

The connection has the following fields:

Field Description
Name Enter a name for the connection.
Description (optional) Enter a description for the connection.
Authorization Type

Select an authentication type.

The connection supports two types of authorization:

  • Basic

  • OAuth2

If you select Basic as the Authorization Type, the following fields are displayed:
User Name Enter a user name for the connection.
Password (optional)

Enter a password for the connection.

Some services can send authentication data with user name only. In such cases, you need not provide any password.

If you select OAuth2 as the Authorization Type, the following fields are displayed:
Grant Type

Indicates the method by which an application can obtain an access token.

Select one of the following supported types:

  • Authorization Code

  • Client Credentials

Callback URL

The connection is redirected to this URL after authorization. Your application's callback URL must match this URL.

The URL is read-only.

Auth URL

Authorization server API endpoint.

Example:

Google authorization URL: https://accounts.google.com/o/oauth2/v2/auth

Additional Auth URL Query Parameters (optional)

Additional query parameters to get the refresh token based on the service you request for.

Example:

access_type=offline&prompt=consent

token_access_type=offline

Access Token URL

The token API endpoint used to get access token.

Example:

Google:
https://oauth2.googleapis.com/token

Salesforce: https://login.salesforce.com/services/oauth2/token

Client Id The client id of the OAuth2 application. You can change this value at runtime.
Client Secret The client secret of the OAuth2 application. You can change this value at runtime.
Scope

Specifies the level of access that the application is requesting. You can specify multiple space-delimited values.

Example:

Salesforce: chatter_api refresh_token

Client Authentication

The method by which authentication parameters are sent. Based on the service request, you can send authentication parameters in Header, Body, or Query.

  • Header - Indicates sending authentication parameter through headers.

  • Body - Indicates sending authentication parameters through the body with application/x-www-form-urlencoded.

  • Query - Indicates sending authentication parameters through query parameters.

Token

Indicates the token which is Base64 encoded value with app property enabled.

This field is read-only.

Note: If you select the OAuth 2.0 authorization type for long-running Flogo apps, the refresh tokens returned by the server. For information on obtaining refresh tokens, refer to your OAuth 2.0 provider.
The refresh token operation only happens when the server returns HTTP status code 401.