public String getAuthorizationHeader() {
    StringBuilder buf = new StringBuilder("OAuth");
    appendParameter(buf, "realm", realm);
    appendParameter(buf, "oauth_callback", callback);
    appendParameter(buf, "oauth_consumer_key", consumerKey);
    appendParameter(buf, "oauth_nonce", nonce);
    appendParameter(buf, "oauth_signature", signature);
    appendParameter(buf, "oauth_signature_method", signatureMethod);
    appendParameter(buf, "oauth_timestamp", timestamp);
    appendParameter(buf, "oauth_token", token);
    appendParameter(buf, "oauth_verifier", verifier);
    appendParameter(buf, "oauth_version", version);
    // hack: we have to remove the extra ',' at the end
    return buf.substring(0, buf.length() - 1);
  }
public String getAuthorizationHeader ( ) { StringBuilder buf = new StringBuilder ( "OAuth" ) ; appendParameter ( buf , "realm" , realm ) ; appendParameter ( buf , "oauth_callback" , callback ) ; appendParameter ( buf , "oauth_consumer_key" , consumerKey ) ; appendParameter ( buf , "oauth_nonce" , nonce ) ; appendParameter ( buf , "oauth_signature" , signature ) ; appendParameter ( buf , "oauth_signature_method" , signatureMethod ) ; appendParameter ( buf , "oauth_timestamp" , timestamp ) ; appendParameter ( buf , "oauth_token" , token ) ; appendParameter ( buf , "oauth_verifier" , verifier ) ; appendParameter ( buf , "oauth_version" , version ) ; return buf . substring ( 0 , buf . length ( ) - 1 ) ; }
Returns the {@code Authorization} header value to use with the OAuth parameter values found in
the fields.