public void setPassword ( String password ) { for ( Authentication auth : authentications . values ( ) ) { if ( auth instanceof HttpBasicAuth ) { ( ( HttpBasicAuth ) auth ) . setPassword ( password ) ; return ; } } throw new RuntimeException ( "No HTTP basic authentication configured!" ) ; }
Helper method to set password for the first HTTP basic authentication .