Skip to content

Instantly share code, notes, and snippets.

@jasmo2
Created September 12, 2015 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasmo2/44596c822f7ec2882cf4 to your computer and use it in GitHub Desktop.
Save jasmo2/44596c822f7ec2882cf4 to your computer and use it in GitHub Desktop.
public static Result doLogin() {
com.feth.play.module.pa.controllers.Authenticate.noCache(response());
final Form<MyLogin> filledForm = MyUsernamePasswordAuthProvider.LOGIN_FORM
.bindFromRequest();
if (filledForm.hasErrors()) {
// User did not fill everything properly
return badRequest(login.render(filledForm));
} else {
// Everything was filled
return UsernamePasswordAuthProvider.handleLogin(ctx());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment