Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting the realm to the HTTPUnauthorized class #503

Merged
merged 1 commit into from
Jul 15, 2015

Conversation

ueg1990
Copy link
Contributor

@ueg1990 ueg1990 commented Apr 14, 2015

Based on RFC 7235, add challenges to HTTP Unauthorized to indicate
authentication scheme. A server generating a 401 must send a WWW-Authenticate
header field containing at least one challenge

BREAKING CHANGE: Add new parameter to the init method of class HTTPUnauthorized
to add determine authentication scheme in the WWW-Authenticate header field when a
401 (Unauthorized) is generated

@kgriffs
Copy link
Member

kgriffs commented Apr 15, 2015

See also: Issue #430

@kgriffs
Copy link
Member

kgriffs commented Apr 15, 2015

@ueg1990 Thanks for this! Would you mind ammending your commit message so the first line includes a prefix ala:

fix(HTTPUnauthorized): blah blah...

Also, please reference the issue in the footer on a line by itself, as in:

Fixes #430

Thanks!

@@ -49,18 +49,17 @@ class HTTPUnauthorized(HTTPError):
title (str): Error title (e.g., 'Authentication Required').
description (str): Human-friendly description of the error, along with
a helpful suggestion or two.
scheme (str): Authentication scheme to use as the value of the
WWW-Authenticate header in the response (default ``None``).
challenges (iterable of strings): Authentication scheme to use as the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Authentication scheme" => "One or more authentication challenges to use as the value of the..."

@kgriffs
Copy link
Member

kgriffs commented Apr 15, 2015

@ueg1990 Looks like there's a minor pep8 error.

@jmvrbanac
Copy link
Member

👍 LGTM

@@ -49,18 +49,18 @@ class HTTPUnauthorized(HTTPError):
title (str): Error title (e.g., 'Authentication Required').
description (str): Human-friendly description of the error, along with
a helpful suggestion or two.
scheme (str): Authentication scheme to use as the value of the
WWW-Authenticate header in the response (default ``None``).
challenges (iterable of strings): One or more authentication
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"strings" => "str"

@kgriffs
Copy link
Member

kgriffs commented Apr 20, 2015

@ueg1990 Just one nitpick to address, and then I think this is ready to merge.

@kgriffs
Copy link
Member

kgriffs commented Apr 20, 2015

@ueg1990 In preparation for the merge, would you mind squashing all the patches down to a single commit? You cant git push --force to update the PR in place.

…nauthorized class

Based on RFC 7235, add challenges to HTTP Unauthorized to indicate
authentication scheme. A server generating a 401 must send a WWW-Authenticate
header field containing at least one challenge

BREAKING CHANGE: Add new parameter to the __init__ method of class HTTPUnauthorized
to add determine authentication scheme in the WWW-Authenticate header field when a
401 (Unauthorized) is generated

Fixes falconry#430

Fix pep8 error

Fix docstring
kgriffs added a commit that referenced this pull request Jul 15, 2015
Add support for setting the realm to the HTTPUnauthorized class
@kgriffs kgriffs merged commit af5ac0c into falconry:master Jul 15, 2015
@ueg1990 ueg1990 deleted the issue_430 branch October 20, 2015 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants