General information
This section focuses on implementing authentication for HOME Interfaces.Means of authentication
To be able to use HOME Interfaces web components, you first need to authenticate. To do so, HOME Interfaces expose thedtn-integration-requirements web component that handle most of the authentication logic. It accepts two types of token as an input:
- A forged HOME authentication token;
- A JSON Web Token (JWT) forged by your authentication process.
Recommandation
We recommend using a JWT sincedtn-integration-requirements implements the logic to obtain the HOME authentication token. This means less work for your integration team.Authenticate using JWT
To authenticate using JWT you must follow the following requirements :- Have a client id and an offer family associated to your company.
- The JWT you forged must contain, in its payload, at least the
person-external-id.
Integration requirements web component
Description
Thedtn-integration-requirements web component is required to correctly handle authentication in the HOME Interfaces context.
The web component can process two types of tokens :
- Json Web Token generated using the OpenID process
- A datanumia access token
Usage
Import the basis scripts
Using your application JWT
If the JWT’s payload contains information on both the person external id and the site external id, you must provide those informations :Using a HOME authentication token
You also can use directly a datanumia token if you already created it.Inputs
string
required
The authentication token, which can be your own JWT token or a Datanumia token.
string
required
The offer family associated with the authentication.Example:
FO-XXXXstring
required
The client ID for the OAuth service.Example:
my-client-idstring
Datanumia’s external identifier for the site.Provide this value if the JWT token does not contain the
site-external-id claim.string
Datanumia’s external identifier for a person.Provide this value if the JWT token does not contain the
person-external-id claim.Outputs
object
An error occurred during the authentication process.
Refer to the Error Handling section for more information about the different error types.
CSS Variables
No customization is available for this web component given that it does not have a human-machine interface (HMI).Error handling
As specified in the Output section, the errors can have multiple code where each code as an associated meaning :MISSING_DATA: The input data or the JWT doesn’t fit the requirements. Please check the description to get more informations on what’s going on and don’t hesitate to visit the Authenticate using JWT section if needed.SERVER_ERROR: An error occurred on the server-side.INVALID_JWT: The JWT is malformed. Please verify that the passed JWT respects all the format requirements.