Skip to main content

Authentication and Verification

Interface Authentication Mode

TerraQuanta UIC service provides the RestFul interface authentication, withe the token authentication mode.

  • JWT (JSON WEB TOKEN) authentication mode for page operation
  • SDK directly call SECRET authentication

What is the JWT (JSON WEB TOKEN) authentication mode for page operation:

  • Users can call all other interfaces only after they have registered or logged in the official website of TerraQuanta
  • After the user registers or logs in, the TerraQuanta UIC service will create a token (JWT) and return the token string to the user in the response. When the user calls other interfaces later, request will only get the response successfully if this token string is in the header field (add a attribute of sso-token in the header, with the value of that token string)
  • If the token is lost or times out (120 minutes by default), the user needs to log in again to invoke all other interfaces.
  • As long as the user has accessed any interface within 120 minutes after login, the TerraQuanta UIC will automatically extend the validity period of the user token.

Untitled

What is the SECRET authentication called directly by SDK

After the users log in the official website of TerraQuanta, one can request the SDK access SECRET certificate:

  • this certificate (token: encryption different to JWT) can be user to invoke the interface directly using SDK to obtain TerraQuanta data.
  • When a user makes a call using the SDK, the token string needs to be carried in the header field (add the attribute secret in the header field, with the value being that token string, and also need to add the attribute user-id in the header field, with the value of this field being the unique user ID) to successfully get the response.