question: private AuthenticatedUser authenticateUser ( Credentials credentials ) throws GuacamoleException { GuacamoleCredentialsException authFailure = null ; for ( AuthenticationProvider authProvider : authProviders ) { try { AuthenticatedUser authenticatedUser = authProvider . authenticateUser ( credentials ) ; if ( authenticatedUser != null ) return authenticatedUser ; } catch ( GuacamoleCredentialsException e ) { if ( authFailure == null ) authFailure = e ; } } if ( authFailure != null ) throw authFailure ; throw new GuacamoleInvalidCredentialsException ( "Permission Denied." , CredentialsInfo . USERNAME_PASSWORD ) ; }
target:  Attempts authentication against all AuthenticationProviders, in order, using the provided credentials. The first authentication failure takes priority, but remaining AuthenticationProviders are attempted. If any AuthenticationProvider succeeds, the resulting AuthenticatedUser is returned, and no further AuthenticationProviders are tried.