DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Implementing Authentication and Authorization With Vaadin

4 years ago dzone.com
Implementing Authentication and Authorization With Vaadin

Summary: This is a summary of an article originally published by the source. Read the full original article here →

This article shows how to implement authentication and authorization in Spring Boot Vaadin Flow applications without using Spring Security.

Vaadin hides this paradigm so you can focus on the application and UI logic without having to deeply understand the underlying web technologies.

Create a new AuthService class to encapsulate the authentication and authorization logic: The authenticate method tries to find a user in the database with the given credentials and if it succeeds, a reference to the user is stored in the session and the available routes (links to views in the application) are created for the corresponding user role.

Keep in mind that this code is intended to be an example of how you can use the RouteConfiguration class to register routes at runtime for authorization reasons and might not be production-ready.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com