From ab80ac7996bf792ddf3fbcce639e4b6714b401e6 Mon Sep 17 00:00:00 2001 From: Theron Luhn Date: Tue, 13 Oct 2020 23:08:00 -0700 Subject: Rename `ISecurityPolicy.authenticated_identity` to `identity` --- docs/whatsnew-2.0.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'docs/whatsnew-2.0.rst') diff --git a/docs/whatsnew-2.0.rst b/docs/whatsnew-2.0.rst index a58f317d7..906529d6b 100644 --- a/docs/whatsnew-2.0.rst +++ b/docs/whatsnew-2.0.rst @@ -47,7 +47,7 @@ signature. The new security policy adds the concept of an :term:`identity`, which is an object representing the user associated with the current request. The identity -can be accessed via :attr:`pyramid.request.Request.authenticated_identity`. +can be accessed via :attr:`pyramid.request.Request.identity`. The object can be of any shape, such as a simple ID string or an ORM object. The concept of :term:`principals ` has been removed; the @@ -89,10 +89,8 @@ For further documentation on implementing security policies, see Behavior of the Legacy System ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Legacy authentication and authorization policies will continue to function as -normal, as well as all related :class:`pyramid.request.Request` properties. -The new :attr:`pyramid.request.Request.authenticated_identity` property will -output the same result as :attr:`pyramid.request.Request.authenticated_userid`. +Legacy authentication and authorization policies will continue to function as normal, as well as all related :class:`pyramid.request.Request` properties. +The new :attr:`pyramid.request.Request.identity` property will output the same result as :attr:`pyramid.request.Request.authenticated_userid`. If using a security policy, :attr:`pyramid.request.Request.unauthenticated_userid` will return the same value as :attr:`pyramid.request.Request.authenticated_userid`. :attr:`pyramid.request.Request.effective_principals` will always return a one-element list containing the :data:`pyramid.authorization.Everyone` principal, as there is no equivalent in the new security policy. -- cgit v1.2.3