mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
removing GET from allowed methods on authn/login controller endpoint
This commit is contained in:
@@ -84,13 +84,14 @@ public class AuthenticationRestController implements InitializingBean {
|
||||
return authenticationStatusResource;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/login", method = {RequestMethod.GET, RequestMethod.POST})
|
||||
@RequestMapping(value = "/login", method = {RequestMethod.POST})
|
||||
public ResponseEntity login(HttpServletRequest request, @RequestParam(name = "user", required = false) String user,
|
||||
@RequestParam(name = "password", required = false) String password) {
|
||||
//If you can get here, you should be authenticated, the actual login is handled by spring security
|
||||
//see org.dspace.app.rest.security.StatelessLoginFilter
|
||||
|
||||
//If we don't have an EPerson here, this means authentication failed and we should return an error message.
|
||||
log.info("\n\n***n\nGot Here\n\n***\n\n");
|
||||
|
||||
return getLoginResponse(request,
|
||||
"Authentication failed for user " + user + ": The credentials you provided are not " +
|
||||
|
Reference in New Issue
Block a user