Authentication
Authentication Method
We use the OAuth 2.0 authentication method, an industry standard for authorization, to ensure the security and integrity of user and system identification. This method involves generating tokens that allow secure access to our servers, software, and APIs. Authentication through OAuth 2.0 helps prevent cyber fraud and the leakage of sensitive information by utilizing public key encryption to validate identities.
Creating Public and Private Keys
Before receiving the credential, it is necessary to generate a key pair: one private key and one public key. The private key will be used to sign the token, while the public key should be sent to us to validate the token’s signature.
First, generate the private key using the command below via terminal:
Then, generate the public key through the terminal:
Requesting the Public Key
We will ask for your email to open a request regarding the submission of the public key. After this, you will receive a message from notifications@heflo.com with instructions for sending the key.
Receiving the client_id
After validating your public key, our team will generate and send your client_id
, which will be used for authentication in the system.
Generating the JWT
Generate a TOKEN following the RS256 standard, containing crucial information such as unique identifier, issuance time, and expiration time.
Bearer Token Generation Endpoint
To generate a TOKEN using the OAuth 2.0 method, the client must send a POST request with the Content-Type Header as “application/x-www-form-urlencoded.” Below is the CURL command for the endpoint used to generate the token:
'scope=<< SCOPES>>'
accepts up to 300 characters, and each scope should be separated by a space.After authentication, the obtained access token must be used in all subsequent requests in the authorization header.
Was this page helpful?