diff options
author | Rob Austein <sra@hactrn.net> | 2013-01-31 05:04:39 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2013-01-31 05:04:39 +0000 |
commit | 1dfcb1fc0ae6e9367868c3dab8d38c1bd091dcaf (patch) | |
tree | 9afde39f2bd354e212e709145adaa8763d31ecc0 /rpkid/rpki/gui/views.py | |
parent | b7c329cb97367a670a36dd9c50a3f761dd2b4963 (diff) | |
parent | 7f49d94068077fabfab83307c3f648b710ab369d (diff) |
Pull from trunk.
svn path=/branches/tk377/; revision=4989
Diffstat (limited to 'rpkid/rpki/gui/views.py')
-rw-r--r-- | rpkid/rpki/gui/views.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/rpkid/rpki/gui/views.py b/rpkid/rpki/gui/views.py new file mode 100644 index 00000000..5c62cf62 --- /dev/null +++ b/rpkid/rpki/gui/views.py @@ -0,0 +1,30 @@ +# Copyright (C) 2013 SPARTA, Inc. a Parsons Company +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND SPARTA DISCLAIMS ALL WARRANTIES WITH +# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +# AND FITNESS. IN NO EVENT SHALL SPARTA BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +__version__ = '$Id$' + +import django.contrib.auth.views +from rpki.gui.decorators import tls_required + + +@tls_required +def login(request, *args, **kwargs): + "Wrapper around django.contrib.auth.views.login to force use of TLS." + return django.contrib.auth.views.login(request, *args, **kwargs) + + +@tls_required +def logout(request, *args, **kwargs): + "Wrapper around django.contrib.auth.views.logout to force use of TLS." + return django.contrib.auth.views.login(request, *args, **kwargs) |