diff options
author | Leif Johansson <leifj@sunet.se> | 2012-04-05 13:03:02 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2012-04-05 13:03:02 +0200 |
commit | 675b5f5e111061e4bdad37d8724d77cd25a02575 (patch) | |
tree | 85df3d2404ef23ec3591362fd0f8bff8194b8ef8 /coip | |
parent | 22bd40bdb993f7174a18b1b6326578b443885d1a (diff) |
djangosaml2
Diffstat (limited to 'coip')
-rw-r--r-- | coip/apps/saml2/urls.py | 3 | ||||
-rw-r--r-- | coip/apps/saml2/views.py | 7 | ||||
-rw-r--r-- | coip/utils.py | 11 |
3 files changed, 14 insertions, 7 deletions
diff --git a/coip/apps/saml2/urls.py b/coip/apps/saml2/urls.py index 1654c66..3965a6d 100644 --- a/coip/apps/saml2/urls.py +++ b/coip/apps/saml2/urls.py @@ -7,5 +7,6 @@ from django.conf.urls.defaults import patterns, url, include urlpatterns = patterns('coip.apps.saml2.views', url(r'^aq$',view='aq'), - url(r'^metadata$',view='metadata') + url(r'^metadata$',view='metadata'), + url(r'^.+',include('djangosaml2.urls')) )
\ No newline at end of file diff --git a/coip/apps/saml2/views.py b/coip/apps/saml2/views.py index f109094..1055644 100644 --- a/coip/apps/saml2/views.py +++ b/coip/apps/saml2/views.py @@ -15,12 +15,7 @@ from saml2.saml import NAME_FORMAT_URI from django.conf import settings from django.views.decorators.csrf import csrf_exempt from saml2.request import AttributeQuery - -def get_full_path(request,path=None): - if path == None: - path = request.path - full_path = ('http', ('', 's')[request.is_secure()], '://', request.META['HTTP_HOST'], path) - return ''.join(full_path) +from coip.utils import get_full_path def _config(request): host = request.get_host().replace(":","-") diff --git a/coip/utils.py b/coip/utils.py new file mode 100644 index 0000000..f340721 --- /dev/null +++ b/coip/utils.py @@ -0,0 +1,11 @@ +''' +Created on Apr 5, 2012 + +@author: leifj +''' + +def get_full_path(request,path=None): + if path == None: + path = request.path + full_path = ('http', ('', 's')[request.is_secure()], '://', request.META['HTTP_HOST'], path) + return ''.join(full_path)
\ No newline at end of file |