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/
If you're after the basic authentication manager, the following code will get it in your app without extra xml config:
@SuppressWarnings({"SpringJavaAutowiringInspection"}) @Resource(name = "org.springframework.security.authenticationManager") private AuthenticationManager authenticationManager;