Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 11, 2021. It is now read-only.

Commit 93cac32

Browse files
author
leah.culver
committed
OAuth authorization realm parameter is now optional. Thanks Toby White.
git-svn-id: https://oauth.googlecode.com/svn/code/python@1010 f7ae4463-c52f-0410-a7dc-93bad6e629e8
1 parent c2203d0 commit 93cac32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎oauth/oauth.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ def from_request(http_method, http_url, headers=None, parameters=None,
203203
auth_header = headers['Authorization']
204204
# Check that the authorization header is OAuth.
205205
if auth_header.index('OAuth') > -1:
206+
auth_header = auth_header.lstrip('OAuth ')
206207
try:
207208
# Get the parameters from the header.
208209
header_params = OAuthRequest._split_header(auth_header)
@@ -267,7 +268,7 @@ def _split_header(header):
267268
parts = header.split(',')
268269
for param in parts:
269270
# Ignore realm parameter.
270-
if param.find('OAuth realm') > -1:
271+
if param.find('realm') > -1:
271272
continue
272273
# Remove whitespace.
273274
param = param.strip()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /