OAuth 2.0 authorization

Last modified: 11 February 2024

The HTTP Client supports OAuth 2.0 authorization. You can get an access token and authenticate your request to OAuth 2.0 protected resources. To let you enter the user credentials, the HTTP Client displays the login form in the built-in JCEF browser. This non-modal browser doesn't prevent you from working in the IDE, allowing you, for example, to copy and paste your username and password.

A typical flow includes the following steps:

  1. Specify authentication settings, such as the grant type and token URL, in JSON format in a public environment file.

  2. Refer to this authentication configuration in your HTTP requests using the $auth.token variable.

  3. Run the request. If authentication is successful, you will access the protected resource. You can check the received access token and refresh token in the HTTP Client Authentication Log or in the Services tool window.

  4. You can also manually refresh the access token or re-initialize the authentication procedure by requesting a new token.

When you refresh or get a new token, the access and refresh token and other authentication details are displayed in the HTTP Client Authentication Log tool window (View | Tool Windows | HTTP Client Authentication Log).

HTTP Client Authentication Log tool window