public static String getCredentialStringOutput ( HTTP http ) { if ( http == null || ! http . useCredentials ( ) ) { return "" ; } StringBuilder credentials = new StringBuilder ( ) ; String uuid = getUUID ( ) ; credentials . append ( ONCLICK_TOGGLE ) . append ( uuid ) . append ( "\")'>Toggle Credentials</a> " ) ; credentials . append ( SPAN_ID ) . append ( uuid ) . append ( DISPLAY_NONE ) ; credentials . append ( "<div><i>" ) ; credentials . append ( "Username: " ) ; credentials . append ( http . getUser ( ) ) ; credentials . append ( "</div><div>" ) ; credentials . append ( "Password: " ) ; credentials . append ( http . getPass ( ) ) ; credentials . append ( "</i></div>" ) ; credentials . append ( END_SPAN ) ; return credentials . toString ( ) ; }
Looks for the simple login credentials username and password and if they are both set turns that into a string which will be formatted for HTML to be printed into the output file