Authentication
Authentication Methods
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 leaking of confidential information by using public key cryptography to validate identities.
Creating Public and Private Keys
Before receiving the credential, you need to generate a pair of keys: a private key and a public key. The private key will be used to sign the token, while the public key must be sent to us to validate the token signature.
First, generate the private key using the command below via terminal:
Then generate the public key through the terminal:
Keep the private key in a safe place and never share it.
Public key request
We will ask for your email address to open a request for sending the public key.
After that, you will receive a message from notifications@heflo.com with instructions for sending the key.
Send only your public key for validation by our team, by replying to the HEFLO request email, without adding other people as a copy for safety. If other people are copied, this will invalidate the receipt of the public key.
Receiving 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.
Geração do JWT
Generate a TOKEN following the RS256 standard, containing crucial information such as unique identifier, issuance time and expiration.
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 “x-www-form-urlencoded”, below is the CURL of the endpoint that will be used to generate the token:
After authentication, the obtained access token must be used in all subsequent requests in the authorization header.
Once generated, our Bearer Token is valid for 1 hour. After this period, it will be necessary to generate a new token to ensure the session continues actively and securely