private static String parseUsername(String authorizationHeader){
  String decodedAuthorizationHeader=decodeHeader(authorizationHeader);
  int delimiterIndex=decodedAuthorizationHeader.indexOf(':');
  if (delimiterIndex > -1) {
    return decodedAuthorizationHeader.substring(0,delimiterIndex);
  }
 else {
    return decodedAuthorizationHeader;
  }
}

private static String parseUsername ( String authorizationHeader ) { String decodedAuthorizationHeader = decodeHeader ( authorizationHeader ) ; int delimiterIndex = decodedAuthorizationHeader . indexOf ( ':' ) ; if ( delimiterIndex > - 1 ) { return decodedAuthorizationHeader . substring ( 0 , delimiterIndex ) ; } else { return decodedAuthorizationHeader ; } }
utility for parsing the http basic authentication username .
