private HttpHandler addFormSecurity(final HttpHandler toWrap, final IdentityManager identityManager) { HttpHandler handler = toWrap; handler = new AuthenticationCallHandler(handler); handler = new AuthenticationConstraintHandler(handler); final List<AuthenticationMechanism> mechanisms = new ArrayList<>(); mechanisms.add(new CachedAuthenticatedSessionMechanism()); mechanisms.add(new FormAuthenticationMechanism("oauth2", "/login", "/error", "/oauth2/code")); handler = new AuthenticationMechanismsHandler(handler, mechanisms); handler = new SecurityInitialHandler(AuthenticationMode.PRO_ACTIVE, identityManager, handler); handler = new SessionAttachmentHandler(handler, new InMemorySessionManager("oauth2"), new SessionCookieConfig()); return handler; }
private static HttpHandler addFormSecurity(final HttpHandler toWrap, final IdentityManager identityManager) { HttpHandler handler = toWrap; handler = new AuthenticationCallHandler(handler); handler = new AuthenticationConstraintHandler(handler); final List<AuthenticationMechanism> mechanisms = new ArrayList<>(); mechanisms.add(new CachedAuthenticatedSessionMechanism()); mechanisms.add(new FormAuthenticationMechanism("oauth2", "/login", "/error", "/oauth2/authorize")); handler = new AuthenticationMechanismsHandler(handler, mechanisms); handler = new SecurityInitialHandler(AuthenticationMode.PRO_ACTIVE, identityManager, handler); handler = new SessionAttachmentHandler(handler, new InMemorySessionManager("oauth2"), new SessionCookieConfig()); return handler; } }
handler = new ConstraintMatcherHandler(matches, handler, toWrap, errorPage); final List<AuthenticationMechanism> mechanisms = new LinkedList<AuthenticationMechanism>(); mechanisms.add(new CachedAuthenticatedSessionMechanism()); mechanisms.add(new UndertowAuthenticationMechanism(deploymentContext, userSessionManagement, nodesRegistrationManagement, -1, null)); handler = new AuthenticationMechanismsHandler(handler, mechanisms);
authenticationMechanisms.add(new CachedAuthenticatedSessionMechanism()); //TODO: does this really need to be hard coded?
undertowMechanisms.add(wrap(new CachedAuthenticatedSessionMechanism(), null)); for (AuthMechanism current : mechanisms) { switch (current) {
undertowMechanisms.add(wrap(new CachedAuthenticatedSessionMechanism(), null)); for (AuthMechanism current : mechanisms) { switch (current) {
authenticationMechanisms.add(new CachedAuthenticatedSessionMechanism(identityManager));
authenticationMechanisms.add(new CachedAuthenticatedSessionMechanism()); //TODO: does this really need to be hard coded?