summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheron Luhn <theron@luhn.com>2019-12-14 19:05:36 -0600
committerTheron Luhn <theron@luhn.com>2019-12-14 19:11:07 -0600
commitfe637b6953eb95137844a4c1153ccc33ab8136e3 (patch)
treeed263b969a3db711a99ff596263880703489b629
parent495da107e3da765649957a0c03561648ea75e26b (diff)
downloadpyramid-fe637b6953eb95137844a4c1153ccc33ab8136e3.tar.gz
pyramid-fe637b6953eb95137844a4c1153ccc33ab8136e3.tar.bz2
pyramid-fe637b6953eb95137844a4c1153ccc33ab8136e3.zip
Bring back `identify` to `LegacySecurityPolicy`.
-rw-r--r--src/pyramid/security.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pyramid/security.py b/src/pyramid/security.py
index 838bcebbd..f07bc0bfe 100644
--- a/src/pyramid/security.py
+++ b/src/pyramid/security.py
@@ -427,6 +427,9 @@ class LegacySecurityPolicy:
def _get_authz_policy(self, request):
return request.registry.getUtility(IAuthorizationPolicy)
+ def identify(self, request):
+ return self.authenticated_userid(request)
+
def authenticated_userid(self, request):
authn = self._get_authn_policy(request)
return authn.authenticated_userid(request)