summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorTheron Luhn <theron@luhn.com>2019-12-17 11:33:18 -0800
committerTheron Luhn <theron@luhn.com>2019-12-17 11:33:18 -0800
commit014b5ecedec76fd7bbade6c954adce94954bd171 (patch)
tree73f775e4b86f6657c469084a4d92263ca19a49f4 /docs/narr
parent3b34a67aa3916a766369220a0185b648b9513489 (diff)
downloadpyramid-014b5ecedec76fd7bbade6c954adce94954bd171.tar.gz
pyramid-014b5ecedec76fd7bbade6c954adce94954bd171.tar.bz2
pyramid-014b5ecedec76fd7bbade6c954adce94954bd171.zip
Use `self.identify` instead of `request.authenticated_identity`
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/security.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/narr/security.rst b/docs/narr/security.rst
index 50eeab27b..ac64cba0a 100644
--- a/docs/narr/security.rst
+++ b/docs/narr/security.rst
@@ -78,7 +78,7 @@ A simple security policy might look like the following:
def authenticated_userid(self, request):
""" Return a string ID for the user. """
- identity = request.authenticated_identity
+ identity = self.identify(request)
if identity is None:
return None
return string(identity.id)
@@ -153,7 +153,7 @@ For example, our above security policy can leverage these helpers like so:
def authenticated_userid(self, request):
""" Return a string ID for the user. """
- identity = request.authenticated_identity
+ identity = self.identify(request)
if identity is None:
return None
return str(identity.id)