Skip to content

Commit

Permalink
#133 remove deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Feb 17, 2017
1 parent fbcb815 commit c9fc31b
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
Expand Down Expand Up @@ -89,19 +88,10 @@ private void assertAuthenticated()
.orElseThrow(() -> new NotAuthenticatedException());
}

@PostMapping(value = "/authenticate")
public JSONLoginAuthResponse authenticate( //
@RequestBody(required = false) JSONLoginAuthRequest request //
, @Deprecated @RequestParam(name = "username", required = false) final String username_DEPRECATED //
, @Deprecated @RequestParam(name = "password", required = false) final String password_DEPRECATED //
)
@PostMapping("/authenticate")
public JSONLoginAuthResponse authenticate(@RequestBody final JSONLoginAuthRequest request)
{
userSession.assertNotLoggedIn();

if(request == null)
{
request = new JSONLoginAuthRequest(username_DEPRECATED, password_DEPRECATED);
}

final Login loginService = getLoginService();
final MSession session = createMSession(loginService);
Expand Down

0 comments on commit c9fc31b

Please sign in to comment.