-
Notifications
You must be signed in to change notification settings - Fork 886
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
security docs enhancements #1399
Conversation
…id". Make the change througout the authentication policies, etc. as well.
This PR changes the public signature for |
@@ -16,7 +16,7 @@ Authentication API Functions | |||
|
|||
.. autofunction:: forget | |||
|
|||
.. autofunction:: remember | |||
.. autofunction:: remember(request, userid, **kwargs) |
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.
Redundant? autofunction
already sniffs the signature, unless it is hidden by a decorator.
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.
It's done here to hide the userid=_marker
from the new signature in the docs. We do this in some other areas as well where a function has some extra arg used only for testing.
-0 on renaming |
Like it or not pyramid has named the identifier tracked between requests as a userid, whether it is a token or id or anything else. See |
@mmerickel Would it make more sense to introduce |
I'd be happy to name it a |
I don't get that: principal is the precise term for what the authn/authz machinery deals with. |
I'd say authz, not authn. |
Principals are first "authenticated"/"identified"; only then can their authorization be tested. We didn't make this jargon up: it widely used in software security analysis. If presenting a valid token as part of a request gets you access to otherwise protected resources, then a token is a principal: that is what principal means. |
In my mind, it'd be I genuinely think the distinction is useful in understanding the API. If you feel so strongly about it I won't complain if you want to change it. I've made my feelings pretty clear at this point. But I'd appreciate having some comments from someone else as well. |
This PR replaces #1397.