Logging into Pentaho

Before any interaction with Pentaho, the user must be authenticated through a valid session. To get a valid session in Pentaho you will need a login form, to ask for user's credentials (username and password). Of course you could reuse a login form you already have into your existing application, but in this section you will learn how to develop a very basic login component from scratch.

1. Creating the login component

To create a new component into your application, open a terminal and execute the following command from the root of your project.

ng g component login

This command creates the login folder into app and setup the project to work with it.

2. Adding the login component to routing

Of course, you want your new login page to be routed into your application, in this case on /login path. To reach that goal, edit the app.module.ts file into the src/app path and the following routing.