Example usage for org.apache.wicket.authroles.authentication AuthenticatedWebSession signIn

List of usage examples for org.apache.wicket.authroles.authentication AuthenticatedWebSession signIn

Introduction

In this page you can find the example usage for org.apache.wicket.authroles.authentication AuthenticatedWebSession signIn.

Prototype

public final boolean signIn(final String username, final String password) 

Source Link

Document

Try to logon the user.

Usage

From source file:de.tudarmstadt.ukp.clarin.webanno.webapp.security.LoginForm.java

License:Apache License

@Override
protected void onSubmit() {
    AuthenticatedWebSession session = AuthenticatedWebSession.get();
    if (session.signIn(username, password)) {
        setDefaultResponsePageIfNecessary();
    } else {//  ww w  . j  a v a 2  s.  c  o m
        error("Login failed");
        LOG.error("Login failed");
    }
}

From source file:de.tudarmstadt.ukp.csniper.webapp.security.LoginForm.java

License:Apache License

@Override
protected void onSubmit() {
    AuthenticatedWebSession session = AuthenticatedWebSession.get();
    if (session.signIn(username, password)) {
        setDefaultResponsePageIfNecessary();
    } else {//from   w  ww. j  a  v a  2  s  .  com
        error("Login failed");
    }
}