Login Functionality

A look at the mechanism to handle login functionality.

About the application

In this application, we will be looking at some modifications in our landing page, landingPageView.py. We have a Login component in the component tree that will be holding all the login functionality, which includes authenticating the user on the provided privileges and getting back to the user with feedback about login’s status. This feedback is either success or failure.

This is what the application looks like:

Note: To log in, use the username admin and password 123.

Copyright (c) 2020 John Sheehan

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Adding login functionality to the landing page

Refactoring the LandingPage component

First, we will look at how to refactor the existing LandingPage component in landingPageView.py located inside the src/views/landingPage/ folder to add the state variables required by the Login component. Also, we’ll look at how we can provide a DOM ...