This guide assumes proficiency in web application development using Angular, Typescript and Node.js
Stack: Angular 14, bootstrap, font-awesome, rxjs, TypeScript and Node.js. See package.json for more information
This reference code assumes that Haventec JWT (Direct Api Mode) has been selected while creating your application in Console. Further, you will need to refer to settings available from the Console Application Details for values required to configure your front-end application and your server.
Before you start
Please review the following articles before continuing:
You will need to have signed up your organisation in Haventec Console 2.0.
Further, you will need to have created an application which you would like to authenticate with Haventec.
Your front-end network service will require the application's provisioned applicationUuid value. You will find this in your application details within Console 2.0.
Assign this value to the APPLICATION_UUID constant in your application code. An example of this can be found in the application.constants.ts file of the reference projects, described below.
Be sure to configure your local server in proxy.conf.json in the root of the the authenticate-angular-sdk folder. By default this is set to target the localhost port on which the authenticate-node-server instance will run. See authenticate-node-server for configuration details.
Running your project application
When your project application is running, 6-digit authentication numbers (tokens) will be requested for entry by the user. These tokens will be generated and displayed in the Node.js console log, or wherever your server logs to. Cut and paste to complete the authentication. Alternatively you can configure a mail server to send these tokens via email. Use these where prompted.
Please refer to the README.md files within each workspace directory for information on how to install, configure and run your project application and server.
Reference Code Overview
The >src folder of this project contains the application, assets and configuration files. Each will be explored in turn.
Please refer to the actual code pertaining to each resource mentioned for this project.
Maps paths to components
Defaults to landing-page (see below)
<router-outlet> for this routing module is contained in app.component.html
Pages are generally loaded in response to navigation commands within components following network activity.
|Implementation specific configuration properties.
Please assign the Application UUID you received from Haventec Console
You can find out where to locate these values for your application here:
Various interfaces corresponding to individual pages and the service calls and responses associated with them.
Note that the properties used for the various service calls may be a subset of those available in the Haventec Authenticate APIs
The interfaces provide definitions corresponding to:
Default route component which lists available options:
Upon selection, the user is routed to the relevant page:
Add a User to this Device
Add a Device for an Existing User
Reset your PIN on this Device
|This service provides handles to access the Haventec Authenticate SDK local storage utilities.
Information about this SDK is available at the following github repo page:
Provides access to server endpoints.
This implementation makes requests to a Node.js server to proxy calls to the Haventec Authentication SaaS services, and provide email services.
You can find more information about the sample Node.js server here:
Logos, fonts and font face definitions, and various styling definitions are provided as placeholders for your own styles
Files sitting at the root of the >src folder are those typically found in Angular applications. Please refer to relevant web training resources for more information.