summaryrefslogtreecommitdiff
path: root/repoze/bfg/zcml.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-02-03 02:51:24 +0000
committerChris McDonough <chrism@agendaless.com>2010-02-03 02:51:24 +0000
commit5ba0636b83277c24c48e81427a176541266cd30e (patch)
tree438d0e506d4f735180fefac9bc7e271e236b0584 /repoze/bfg/zcml.py
parentb538144a028116b3d4ed5bffa5ca30edaf32f191 (diff)
downloadpyramid-5ba0636b83277c24c48e81427a176541266cd30e.tar.gz
pyramid-5ba0636b83277c24c48e81427a176541266cd30e.tar.bz2
pyramid-5ba0636b83277c24c48e81427a176541266cd30e.zip
Bug Fixes
--------- - Ensure that ``secure`` flag for AuthTktAuthenticationPolicy constructor does what it's documented to do (merge Daniel Holth's fancy-cookies-2 branch). New Features ------------ - Add ``path`` and ``http_only`` options to AuthTktAuthenticationPolicy constructor (merge Daniel Holth's fancy-cookies-2 branch).
Diffstat (limited to 'repoze/bfg/zcml.py')
-rw-r--r--repoze/bfg/zcml.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/repoze/bfg/zcml.py b/repoze/bfg/zcml.py
index 297a59434..fabc1a03c 100644
--- a/repoze/bfg/zcml.py
+++ b/repoze/bfg/zcml.py
@@ -445,6 +445,8 @@ class IAuthTktAuthenticationPolicyDirective(Interface):
timeout = Int(title=u"timeout", required=False, default=None)
reissue_time = Int(title=u"reissue_time", required=False, default=None)
max_age = Int(title=u"max_age", required=False, default=None)
+ path = ASCIILine(title=u"path", required=False, default='/')
+ http_only = Bool(title=u"http_only", required=False, default=False)
def authtktauthenticationpolicy(_context,
secret,
@@ -454,7 +456,9 @@ def authtktauthenticationpolicy(_context,
include_ip=False,
timeout=None,
reissue_time=None,
- max_age=None):
+ max_age=None,
+ http_only=False,
+ path='/'):
try:
policy = AuthTktAuthenticationPolicy(secret,
callback=callback,
@@ -463,7 +467,9 @@ def authtktauthenticationpolicy(_context,
include_ip = include_ip,
timeout = timeout,
reissue_time = reissue_time,
- max_age=max_age)
+ max_age=max_age,
+ http_only=http_only,
+ path=path)
except ValueError, why:
raise ConfigurationError(str(why))
# authentication policies must be registered eagerly so they can