{"id":15383560,"url":"https://github.com/mvysny/vaadin-spring-security-rest","last_synced_at":"2026-01-03T15:03:01.860Z","repository":{"id":222799666,"uuid":"758409846","full_name":"mvysny/vaadin-spring-security-rest","owner":"mvysny","description":"Demoes Vaadin Spring Security authenticating users over a REST endpoint","archived":false,"fork":false,"pushed_at":"2024-07-17T05:23:45.000Z","size":178,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-09T00:43:17.567Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvysny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-16T09:03:28.000Z","updated_at":"2024-07-17T05:23:48.000Z","dependencies_parsed_at":"2024-04-23T09:17:20.374Z","dependency_job_id":"64f94295-5df2-4d9f-b9c0-3ae5973d32d2","html_url":"https://github.com/mvysny/vaadin-spring-security-rest","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":0.2222222222222222,"last_synced_commit":"cb736567c4675978c72ab43a8d13d26b7bbf59f0"},"previous_names":["mvysny/vaadin-spring-security-rest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvysny%2Fvaadin-spring-security-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvysny%2Fvaadin-spring-security-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvysny%2Fvaadin-spring-security-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvysny%2Fvaadin-spring-security-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvysny","download_url":"https://codeload.github.com/mvysny/vaadin-spring-security-rest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864627,"owners_count":20360355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T14:38:41.863Z","updated_at":"2026-01-03T15:03:01.778Z","avatar_url":"https://github.com/mvysny.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## How to implement custom username and password validation using Spring Security and Vaadin\n\nI used https://start.vaadin.com to create a base for this project. I configured two views that are accessible \nonly when the user logs in. This is the [link to the project](https://start.vaadin.com/app/p?id=d44c0733-7335-4e7a-bceb-287ebd20e863\u0026preview=)\nThat added Spring Security to the project (see `SecurityConfiguration` class) and did the necessary configuration\nby extending the `VaadinWebSecurity`. That makes things much easier.\n\nThis default configuration uses the `UserRESTService` to login the user.\n`UserRESTService` has only one method: `loginUser(String username, String password)`.\n\nIf, for any reason, you do not like this flow, or you simply need to validate the password using another way,\nyou have to provide your own implementation of the `AuthenticationProvider`. See `CustomAuthenticationProvider` class for more details.\n\n\u003e Acknowledgements: this app builds on excellent [Bretislav Wajtr's Custom Password Check app](https://github.com/bwajtr/example-vaadin-spring-security-custom-password-check).\n\n## Useful stuff for debugging\n\n* Place a breakpoint in the `org.springframework.security.authentication.ProviderManager.authenticate` method and see what is going on in there when you press Login button in the login form\n* Place a breakpoint in the `UserRESTService.loginUser()` method and see what is going on in there when you press Login button in the login form\n* Spring Security uses a set of filters to perform the whole authentication process. Take a look what filters and in which order they are executed by searching for `DefaultSecurityFilterChain` in the application log. The log line starts with `Will securty any request with`\n\n## Running the application\n\nThe project is a standard Maven project. To run it from the command line,\ntype `mvnw` (Windows), or `./mvnw` (Mac \u0026 Linux), then open\nhttp://localhost:8080 in your browser.\n\nYou can also import the project to your IDE of choice as you would with any\nMaven project. Read more on [how to import Vaadin projects to different IDEs](https://vaadin.com/docs/latest/guide/step-by-step/importing) (Eclipse, IntelliJ IDEA, NetBeans, and VS Code).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvysny%2Fvaadin-spring-security-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvysny%2Fvaadin-spring-security-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvysny%2Fvaadin-spring-security-rest/lists"}