use of org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis in project java-design-patterns by iluwatar.
the class SimpleApplication method newSession.
@Override
public Session newSession(final Request request, final Response response) {
if (!DEMO_MODE_USING_CREDENTIALS_AS_QUERYARGS) {
return super.newSession(request, response);
}
// else demo mode
final AuthenticatedWebSessionForIsis s = (AuthenticatedWebSessionForIsis) super.newSession(request, response);
IRequestParameters requestParameters = request.getRequestParameters();
final org.apache.wicket.util.string.StringValue user = requestParameters.getParameterValue("user");
final org.apache.wicket.util.string.StringValue password = requestParameters.getParameterValue("pass");
s.signIn(user.toString(), password.toString());
return s;
}
Aggregations