8788899091929394959697
public Session newSession(Request request, Response response) { WaspSession session = (WaspSession)super.newSession(request, response); try { session.login(new PrimaryLoginContext()); } catch (LoginException e) { throw new RuntimeException(e); }
8586878889909192939495
try { LoginContext context; if ("test".equals(username)) { context = new PrimaryLoginContext(); } else if ("all".equals(username)) { context = new CustomLoginContext(new SimplePrincipal("all permissions")); }