-
-
Notifications
You must be signed in to change notification settings - Fork 945
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
Conversation
See also: Issue #430 |
@ueg1990 Thanks for this! Would you mind ammending your commit message so the first line includes a prefix ala:
Also, please reference the issue in the footer on a line by itself, as in:
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 |
There was a problem hiding this comment.
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..."
@ueg1990 Looks like there's a minor pep8 error. |
👍 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"strings" => "str"
@ueg1990 Just one nitpick to address, and then I think this is ready to merge. |
@ueg1990 In preparation for the merge, would you mind squashing all the patches down to a single commit? You cant |
…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
Add support for setting the realm to the HTTPUnauthorized 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