boolean success = false; for (AuthenticationMechanism mechanism : mechanisms) { AuthenticationMechanism.AuthenticationMechanismOutcome result = mechanism.authenticate(exchange, securityContext); if (result == AUTHENTICATED) { success = true; } else { for (AuthenticationMechanism mechanism : mechanisms) { AuthenticationMechanism.ChallengeResult challengeResult = mechanism.sendChallenge(exchange, securityContext); if (challengeResult.getDesiredResponseCode() != null) { exchange.setResponseCode(challengeResult.getDesiredResponseCode());
final AuthenticationMechanism mechanism = currentMethod.item; currentMethod = currentMethod.next; AuthenticationMechanismOutcome outcome = mechanism.authenticate(exchange, SecurityContextImpl.this); if(UndertowLogger.SECURITY_LOGGER.isDebugEnabled()) { UndertowLogger.SECURITY_LOGGER.debugf("Authentication outcome was %s with method %s for %s", outcome, mechanism, exchange.getRequestURI());
final AuthenticationMechanism mechanism = currentMethod.item; currentMethod = currentMethod.next; ChallengeResult result = mechanism.sendChallenge(exchange, SecurityContextImpl.this); if(result == null) { throw UndertowMessages.MESSAGES.sendChallengeReturnedNull(mechanism);
@Override public AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext) { try { initialiseRealmIdentityManager(exchange); return wrapped.authenticate(exchange, securityContext); } finally { RealmIdentityManager.clearRequestSpecific(); } }
@Override public ChallengeResult sendChallenge(HttpServerExchange exchange, SecurityContext securityContext) { try { initialiseRealmIdentityManager(exchange); return wrapped.sendChallenge(exchange, securityContext); } finally { RealmIdentityManager.clearRequestSpecific(); } }
boolean success = false; for (AuthenticationMechanism mechanism : mechanisms) { AuthenticationMechanism.AuthenticationMechanismOutcome result = mechanism.authenticate(exchange, securityContext); if (result == AUTHENTICATED) { success = true; } else { for (AuthenticationMechanism mechanism : mechanisms) { AuthenticationMechanism.ChallengeResult challengeResult = mechanism.sendChallenge(exchange, securityContext); if (challengeResult.getDesiredResponseCode() != null) { exchange.setResponseCode(challengeResult.getDesiredResponseCode());
private boolean isSuccessfulAuthenticatedMethodFound(HttpServerExchange exchange) { boolean successfulAuthenticatedMethodFound = false; List<AuthenticationMechanism> authenticationMechanisms = exchange.getSecurityContext().getAuthenticationMechanisms(); for (AuthenticationMechanism authenticationMechanism : authenticationMechanisms) { AuthenticationMechanism.AuthenticationMechanismOutcome authenticationMechanismOutcome = authenticationMechanism.authenticate(exchange, exchange.getSecurityContext()); if(authenticationMechanismOutcome.equals(AuthenticationMechanism.AuthenticationMechanismOutcome.AUTHENTICATED)) { successfulAuthenticatedMethodFound = true; } } return successfulAuthenticatedMethodFound; } }
mechanism(opera, digest).sendChallenge(exchange, null); String reply = "<html><script type='text/javascript'>window.location=\"" + protocol + "://" + host + "/\";</script></html>";
boolean success = false; for (AuthenticationMechanism mechanism : mechanisms) { AuthenticationMechanism.AuthenticationMechanismOutcome result = mechanism.authenticate(exchange, securityContext); if (result == AUTHENTICATED) { success = true; } else { for (AuthenticationMechanism mechanism : mechanisms) { AuthenticationMechanism.ChallengeResult challengeResult = mechanism.sendChallenge(exchange, securityContext); if (challengeResult.getDesiredResponseCode() != null) { exchange.setResponseCode(challengeResult.getDesiredResponseCode());
final AuthenticationMechanism mechanism = currentMethod.item; currentMethod = currentMethod.next; AuthenticationMechanismOutcome outcome = mechanism.authenticate(exchange, SecurityContextImpl.this); if(UndertowLogger.SECURITY_LOGGER.isDebugEnabled()) { UndertowLogger.SECURITY_LOGGER.debugf("Authentication outcome was %s with method %s for %s", outcome, mechanism, exchange.getRequestURI());
final AuthenticationMechanism mechanism = currentMethod.item; currentMethod = currentMethod.next; ChallengeResult result = mechanism.sendChallenge(exchange, SecurityContextImpl.this); if(result == null) { throw UndertowMessages.MESSAGES.sendChallengeReturnedNull(mechanism);
final AuthenticationMechanism mechanism = currentMethod.item; currentMethod = currentMethod.next; AuthenticationMechanismOutcome outcome = mechanism.authenticate(exchange, SecurityContextImpl.this); if(UndertowLogger.SECURITY_LOGGER.isDebugEnabled()) { UndertowLogger.SECURITY_LOGGER.debugf("Authentication outcome was %s with method %s for %s", outcome, mechanism, exchange.getRequestURI());
final AuthenticationMechanism mechanism = currentMethod.item; currentMethod = currentMethod.next; ChallengeResult result = mechanism.sendChallenge(exchange, SecurityContextImpl.this); if(result == null) { throw UndertowMessages.MESSAGES.sendChallengeReturnedNull(mechanism);