Skip to content

Commit

Permalink
Adding a second sign url that only return a http status
Browse files Browse the repository at this point in the history
  • Loading branch information
dchohfi committed Oct 2, 2012
1 parent 6434bdf commit 0c4a68c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/br/com/caelum/vraptor/mauth/LoginController.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ public void signin(String email, String password, String urlAfterLogin) {
result.redirectTo(urlAfterLogin);
}
}

@Post("/easySigin")
public void signin(String email, String password) {
boolean isAuthenticated = authenticator.authenticate(email, password);
if (!isAuthenticated) {
result.use(Results.status()).notAcceptable();
return;
}
result.use(Results.status()).accepted()
}

@Get
public void signinHack(Long id) {
Expand Down

0 comments on commit 0c4a68c

Please sign in to comment.