diff options
| author | Chris McDonough <chrism@plope.com> | 2011-01-19 11:29:47 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-01-19 11:29:47 -0500 |
| commit | e4e97b22f60df2e73c91cf3eb16c53bb2b468515 (patch) | |
| tree | f6f3ae798dee58961deeceff3331a8ba86b33f99 | |
| parent | cbccade72ab39d6bb3fbe87e4ef6493ec60f131a (diff) | |
| download | pyramid-e4e97b22f60df2e73c91cf3eb16c53bb2b468515.tar.gz pyramid-e4e97b22f60df2e73c91cf3eb16c53bb2b468515.tar.bz2 pyramid-e4e97b22f60df2e73c91cf3eb16c53bb2b468515.zip | |
docs
| -rw-r--r-- | pyramid/authentication.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/pyramid/authentication.py b/pyramid/authentication.py index 133b8381b..2f446921c 100644 --- a/pyramid/authentication.py +++ b/pyramid/authentication.py @@ -436,7 +436,21 @@ class AuthTktCookieHelper(object): def remember(self, request, userid, max_age=None, tokens=()): """ Return a set of Set-Cookie headers; when set into a response, - these headers will represent a valid authentication ticket.""" + these headers will represent a valid authentication ticket. + + ``max_age`` + The max age of the auth_tkt cookie, in seconds. When this value is + set, the cookie's ``Max-Age`` and ``Expires`` settings will be set, + allowing the auth_tkt cookie to last between browser sessions. + Default: ``None``. + + ``tokens`` + A sequence of strings that will be placed into the auth_tkt tokens + field. Each string in the sequence must be of the Python ``str`` + type and must match the regex ``^[A-Za-z][A-Za-z0-9+_-]*$``. + Tokens are available in the returned identity when an auth_tkt is + found in the request and unpacked. Default: ``()``. + """ max_age = max_age or self.max_age environ = request.environ |
