David Artmann
David Artmann

Reputation: 4402

Authenticate user within Spring Boot + Vaadin application

I am building a Spring Boot application with Vaadin as front end. The application uses a third party library to authenticate the user with his identity card via SAML. After this authentication the user is redirected back to my service and I can fetch the authentication result and optional attributes.

My question is, how can I implement the protection of specific Vaadin views within my application based on the authentication via the user's ID card and how do I set the user as authenticated appropriately?

I am new to Spring Security and the majority of its examples shows authentication via a login form with username and password which does not fit in this case.

Upvotes: 0

Views: 582

Answers (1)

Katharina
Katharina

Reputation: 1642

You can find two approaches to secure your Spring Vaadin Application with either filter based (so only Spring Security) security, or a hybrid approach in this Github repository: https://github.com/peholmst/SpringSecurityDemo

You can also find blogposts about both approaches here:

Filter Based Security

Hybrid Approach

For you especially the Filter based approach could be interesting. You could implement a Filter checking the token (or whatever) you get from your login server and then allow/deny certain pages on your server for certain roles.

Upvotes: 0

Related Questions