Skip to content

Commit eff47ef

Browse files
committed
Removed realm handling
1 parent 9c90abd commit eff47ef

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

ox3apiclient/__init__.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ def __init__(self, domain, realm, consumer_key, consumer_secret,
5757
"""
5858
5959
domain -- Your UI domain. The API is accessed off this domain.
60-
realm -- Your sso realm. While not necessary for all OAuth
61-
implementations, it is a requirement for OpenX Enterprise
60+
realm -- This is no longer used. Just specify None.
6261
consumer_key -- Your consumer key.
6362
consumer_secret -- Your consumer secret.
6463
callback_url -- Callback URL to redirect to on successful authorization.
@@ -71,7 +70,6 @@ def __init__(self, domain, realm, consumer_key, consumer_secret,
7170
"""
7271

7372
self.domain = domain
74-
self.realm = realm
7573
self.consumer_key = consumer_key
7674
self.consumer_secret = consumer_secret
7775
self.callback_url = callback_url
@@ -132,10 +130,8 @@ def _sign_request(self, req):
132130
oauth.SignatureMethod_HMAC_SHA1(),
133131
self._consumer,
134132
self._token)
135-
136-
# Update our original requests headers to include the OAuth Authorization
137-
# header and return it.
138-
req.headers.update(oauth_req.to_header(realm=self.realm))
133+
134+
req.headers.update(oauth_req.to_header())
139135
return \
140136
urllib2.Request(req.get_full_url(), headers=req.headers, data=data)
141137

@@ -376,7 +372,6 @@ def client_from_file(file_path='.ox3rc', env=None):
376372
# Required parameters for a ox3apiclient.Client instance.
377373
required_params = [
378374
'domain',
379-
'realm',
380375
'consumer_key',
381376
'consumer_secret']
382377

@@ -392,7 +387,6 @@ def client_from_file(file_path='.ox3rc', env=None):
392387

393388
client = Client(
394389
domain=client_params['domain'],
395-
realm=client_params['realm'],
396390
consumer_key=client_params['consumer_key'],
397391
consumer_secret=client_params['consumer_secret'])
398392

0 commit comments

Comments
 (0)