public String buildAuthorizationHeaderValue ( HttpRequest request , byte [ ] body , OAuth1Credentials oauth1Credentials ) { Map < String , String > oauthParameters = commonOAuthParameters ( oauth1Credentials . getConsumerKey ( ) ) ; oauthParameters . put ( "oauth_token" , oauth1Credentials . getAccessToken ( ) ) ; MultiValueMap < String , String > additionalParameters = union ( readFormParameters ( request . getHeaders ( ) . getContentType ( ) , body ) , parseFormParameters ( request . getURI ( ) . getRawQuery ( ) ) ) ; return buildAuthorizationHeaderValue ( request . getMethod ( ) , request . getURI ( ) , oauthParameters , additionalParameters , oauth1Credentials . getConsumerSecret ( ) , oauth1Credentials . getAccessTokenSecret ( ) ) ; }
Builds an authorization header from a request . Expects that the request s query parameters are form - encoded .