def GetAuthHeader(self, http_method, http_url, realm=''):
    if isinstance(http_url, types.StringTypes):
      http_url = atom.url.parse_url(http_url)
    header = None
    token = None
    if self.key or self.secret:
      token = oauth.OAuthToken(self.key, self.secret)
    oauth_request = oauth.OAuthRequest.from_consumer_and_token(
        self.oauth_input_params.GetConsumer(), token=token,
        http_url=str(http_url), http_method=http_method,
        parameters=http_url.params)
    oauth_request.sign_request(self.oauth_input_params.GetSignatureMethod(),
                               self.oauth_input_params.GetConsumer(), token)
    header = oauth_request.to_header(realm=realm)
    header['Authorization'] = header['Authorization'].replace('+', '%2B')
    return header
Get the authentication header.
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/auth.py/OAuthToken.GetAuthHeader