private void processFailures ( JSONObject jsonFailures ) { if ( jsonFailures == null ) { return ; } MCAAuthorizationManager authManager = ( MCAAuthorizationManager ) BMSClient . getInstance ( ) . getAuthorizationManager ( ) ; ArrayList < String > challenges = getRealmsFromJson ( jsonFailures ) ; for ( String realm : challenges ) { ChallengeHandler handler = authManager . getChallengeHandler ( realm ) ; if ( handler != null ) { JSONObject challenge = jsonFailures . optJSONObject ( realm ) ; handler . handleFailure ( context , challenge ) ; } else { logger . error ( "Challenge handler for realm is not found: " + realm ) ; } } }
Processes authentication failures .