private boolean authTransitionRequired() { switch (authenticationState) { case NOT_ATTEMPTED: // There has been no attempt to authenticate the current request so do so either if required or if we are set to // be pro-active. return isAuthenticationRequired() || authenticationMode == AuthenticationMode.PRO_ACTIVE; case ATTEMPTED: // To be ATTEMPTED we know it was not AUTHENTICATED so if it is required we need to transition to send the // challenges. return isAuthenticationRequired(); default: // At this point the state would either be AUTHENTICATED or CHALLENGE_SENT - either of which mean no further // transitions applicable for this request. return false; } }
@Override public boolean authenticate() { UndertowLogger.SECURITY_LOGGER.debugf("Attempting to authenticate %s, authentication required: %s", exchange.getRequestPath(), isAuthenticationRequired()); if(authenticationState == AuthenticationState.ATTEMPTED || (authenticationState == AuthenticationState.CHALLENGE_SENT && !exchange.isResponseStarted())) { //we are re-attempted, so we just reset the state //see UNDERTOW-263 authenticationState = AuthenticationState.NOT_ATTEMPTED; } return !authTransition(); }
private boolean authTransitionRequired() { switch (authenticationState) { case NOT_ATTEMPTED: // There has been no attempt to authenticate the current request so do so either if required or if we are set to // be pro-active. return isAuthenticationRequired() || authenticationMode == AuthenticationMode.PRO_ACTIVE; case ATTEMPTED: // To be ATTEMPTED we know it was not AUTHENTICATED so if it is required we need to transition to send the // challenges. return isAuthenticationRequired(); default: // At this point the state would either be AUTHENTICATED or CHALLENGE_SENT - either of which mean no further // transitions applicable for this request. return false; } }
private boolean authTransitionRequired() { switch (authenticationState) { case NOT_ATTEMPTED: // There has been no attempt to authenticate the current request so do so either if required or if we are set to // be pro-active. return isAuthenticationRequired() || authenticationMode == AuthenticationMode.PRO_ACTIVE; case ATTEMPTED: // To be ATTEMPTED we know it was not AUTHENTICATED so if it is required we need to transition to send the // challenges. return isAuthenticationRequired(); default: // At this point the state would either be AUTHENTICATED or CHALLENGE_SENT - either of which mean no further // transitions applicable for this request. return false; } }
@Override public boolean authenticate() { UndertowLogger.SECURITY_LOGGER.debugf("Attempting to authenticate %s, authentication required: %s", exchange.getRequestPath(), isAuthenticationRequired()); if(authenticationState == AuthenticationState.ATTEMPTED || (authenticationState == AuthenticationState.CHALLENGE_SENT && !exchange.isResponseStarted())) { //we are re-attempted, so we just reset the state //see UNDERTOW-263 authenticationState = AuthenticationState.NOT_ATTEMPTED; } return !authTransition(); }
@Override public boolean authenticate() { UndertowLogger.SECURITY_LOGGER.debugf("Attempting to authenticate %s, authentication required: %s", exchange.getRequestPath(), isAuthenticationRequired()); if(authenticationState == AuthenticationState.ATTEMPTED || (authenticationState == AuthenticationState.CHALLENGE_SENT && !exchange.isResponseStarted())) { //we are re-attempted, so we just reset the state //see UNDERTOW-263 authenticationState = AuthenticationState.NOT_ATTEMPTED; } return !authTransition(); }