I\'m creating a REST web service using spring and I need to implement login/logout functions in it. The url for the functions should be something like .../api/login and .../api/
Not sure if this is what you need. Programmatically call http://localhost:8080/webappname/j_spring_security_check Pass the username password in form parameters j_username and j_password. In the security-app-context.xml replace form-login element with
Implement spring's AuthenticationSuccessHandler and AuthenticationFailureHandler. The default behavior is to redirect to login form.