com.google.api.ads.common.lib.auth
Class OAuthAuthorizationHeaderProvider

java.lang.Object
  extended by com.google.api.ads.common.lib.auth.OAuthAuthorizationHeaderProvider

public class OAuthAuthorizationHeaderProvider
extends Object

OAuth authorization header provider.

Author:
Adam Rogal

Constructor Summary
OAuthAuthorizationHeaderProvider(String requestMethod)
          Constructor.
 
Method Summary
 String getOAuthAuthorizationHeader(OAuthCompatible oAuthCompatible, com.google.api.client.http.GenericUrl requestUrl)
          Gets the OAuth authorization header for the parameters and request URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthAuthorizationHeaderProvider

@Inject
public OAuthAuthorizationHeaderProvider(String requestMethod)
Constructor.

Parameters:
requestMethod - the request method that will be authenticated against
Method Detail

getOAuthAuthorizationHeader

public String getOAuthAuthorizationHeader(OAuthCompatible oAuthCompatible,
                                          com.google.api.client.http.GenericUrl requestUrl)
                                   throws OAuthException
Gets the OAuth authorization header for the parameters and request URL.

Parameters:
oAuthCompatible - exposes the OAuth parameters
requestUrl - the request URL
Returns:
the Authorization header value to set
Throws:
OAuthException - if the OAuth header could not be created


Copyright © 2012. All Rights Reserved.