Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

The HTTP plugin provides different authentication methods for the defined Datapointsdata points. Although, in some APIs the client request needs to provide authentication information, otherwise the server responds to a client with a 401 (Unauthorized) response.

In the normal HTTP Basic Authentication. each Datapoint can provides a username and password to prove their authentication in (Authentication User, Authentication Password) fields. But some Servers provide tokens, the next 2 example will handle tokens in both (Basic Authentication, OAuth2 Authentication).

...

HTTP Basic/Digest Authentication 

HTTP basic authentication is the traditional way to authenticate to an HTTP using username and password. To configure HTTP basic authentication, just add your username and password to appropriate columns within the HTTP data point definitions.

Image Added

The HTTP plugin will authenticate to the given HTTP server and retrieve the HTTP basic access token and sends it in HTTP request that is used to retrieve the HTTP content.

Older HTTP server may use HTTP digest authentication instead of HTTP basic authentication. To use digest authentication, you have to set the authentication method within the data point definitions:

Image Added

Adding the basic authentication token directly to the HTTP header

If you already have the basic authentication token (instead of username and password), it can be added to the HTTP header directly. To do so, set the "Additional HTTP Headers" . Datapoint requests with the Authorization header that contains the word Basic word followed by a space and token.

...

column to the following:

Code Block
Authorization:
Basic YmRmODRjNzBhYzI0NDM5ZDgyOTE5M2FiMjI1NDBhMDE6OWI2MTYzMEQ3NmUxNEQ1Mzk0MjgwMTdkNzZBRjhmODY=

...

OAuth2 Authentication

...

 Basic <your HTTP token>

For example:


Image Added

Info

Please keep in mind that this method is only necessary if you do not have username and password.


OAuth2 using Bearer Authentication

If a data point needs to make calls to an API that has enable OAuth 2.0 Bearer authentication, you will need also an access token. When passing the access token in an  To do so, set the "Additional HTTP Headers"  with the Authorization header that contains the word Bearer word followed by a space and token.column to the following:

Info
Authorization: Bearer YmRmODRjNzBhYzI0NDM5ZDgyOTE5M2FiMjI1NDBhMDE6OWI2MTYzMEQ3NmUxNEQ1Mzk0MjgwMTdkNzZBRjhmODY=

...

Bearer <your authentication token>

For example:

Image Added