diff options
| author | Theron Luhn <theron@luhn.com> | 2020-10-13 23:08:00 -0700 |
|---|---|---|
| committer | Theron Luhn <theron@luhn.com> | 2020-10-13 23:08:00 -0700 |
| commit | ab80ac7996bf792ddf3fbcce639e4b6714b401e6 (patch) | |
| tree | 1b54439857877acda31c0460c0dfb92648daf0b8 /docs/quick_tutorial | |
| parent | ee7ca28cc51cf40d1190144834704e287c9fc72d (diff) | |
| download | pyramid-ab80ac7996bf792ddf3fbcce639e4b6714b401e6.tar.gz pyramid-ab80ac7996bf792ddf3fbcce639e4b6714b401e6.tar.bz2 pyramid-ab80ac7996bf792ddf3fbcce639e4b6714b401e6.zip | |
Rename `ISecurityPolicy.authenticated_identity` to `identity`
Diffstat (limited to 'docs/quick_tutorial')
| -rw-r--r-- | docs/quick_tutorial/authentication/tutorial/security.py | 4 | ||||
| -rw-r--r-- | docs/quick_tutorial/authorization/tutorial/security.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/quick_tutorial/authentication/tutorial/security.py b/docs/quick_tutorial/authentication/tutorial/security.py index 8324000ed..020403c8b 100644 --- a/docs/quick_tutorial/authentication/tutorial/security.py +++ b/docs/quick_tutorial/authentication/tutorial/security.py @@ -19,13 +19,13 @@ class SecurityPolicy: def __init__(self, secret): self.authtkt = AuthTktCookieHelper(secret=secret) - def authenticated_identity(self, request): + def identity(self, request): identity = self.authtkt.identify(request) if identity is not None and identity['userid'] in USERS: return identity def authenticated_userid(self, request): - identity = self.authenticated_identity(request) + identity = self.identity(request) if identity is not None: return identity['userid'] diff --git a/docs/quick_tutorial/authorization/tutorial/security.py b/docs/quick_tutorial/authorization/tutorial/security.py index 53e3536fc..79e8cb295 100644 --- a/docs/quick_tutorial/authorization/tutorial/security.py +++ b/docs/quick_tutorial/authorization/tutorial/security.py @@ -26,13 +26,13 @@ class SecurityPolicy: self.authtkt = AuthTktCookieHelper(secret=secret) self.acl = ACLHelper() - def authenticated_identity(self, request): + def identity(self, request): identity = self.authtkt.identify(request) if identity is not None and identity['userid'] in USERS: return identity def authenticated_userid(self, request): - identity = self.authenticated_identity(request) + identity = self.identity(request) if identity is not None: return identity['userid'] |
