OK - Authentication
Last updated
Last updated
More authentication information can be found on the Google Identity Toolkit API website.
The fulfillmenttools platform is secured by using an external Identity-Provider (Google Identity Toolkit) which issues JWT tokens in exchange for a valid username and password. This JWT token encodes (among other things) your username, your role and which facility you are assigned to in a secure way. Authorization against our API works by using such an issued JWT Token in every request as a HTTP-Header.
For authentication send a HTTP POST call to this API endpoint:
authKey
, email
and password
have to be valid to your fulfillmenttools instance and are being given to you when the instance was created.
There is an imposed rate limit on calls towards the identitytoolkit for new tokens based on username & password (See Google Identity Platform - Quotas). This could be especially relevant for connector implementations as it might be feasable to cache & share tokens between function invocations.
As a result, an answer looking similar to this is response:
Two attributes in the above response are of special importance:
idToken
is the actual JWT you need to send along every REST Call you issue against the fulfillmenttools API. It has an expiration period to it depicted by the attribute expiresIn. In this case it is valid for 3600 seconds which equals to 1 hour. After that you need to get a fresh token.
refreshToken
should be used to get a fresh token without providing the credentials again.
Every call to the fulfillmenttools API must include the JWT in an Authorization-Bearer header.
To refresh a token, send a HTTP POST call to this API endpoint: