Spring Boot with Security integration with embedded LDAP user data Spring Security is used to protect RESTFul endpoints
- Import the project into Eclipse as Maven project
- Find
Application.javafrom side bar, right click on the file, select 'Run As' > 'Java Application' from menu. - Point your browser to http://localhost:8080
- Run application
- Point your browser to http://localhost:8080/login with POST method and put
username=admin&password=passwordin Payload. - There are more user accounts read from
WebSecurityConfig.javaandtest-server.ldif
- Run application
- Point your browser to http://localhost:8080/admin with GET method and add a custom header
Authorizationwith the token you got from the above step. - All endpoints can be seen from
HomeController.java. For the details of protected endpoints, checkWebSecurityConfig.java