From 183dde3697a371a926c0bdc9dd8bac940c8f98ca Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Thu, 5 Apr 2012 13:35:43 +0200 Subject: dammit --- asgard/settings.d/20-saml.conf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/asgard/settings.d/20-saml.conf b/asgard/settings.d/20-saml.conf index 4394c09..3dc3349 100644 --- a/asgard/settings.d/20-saml.conf +++ b/asgard/settings.d/20-saml.conf @@ -10,8 +10,11 @@ AUTH_PROFILE_MODULE = 'userprofile.UserProfile' LOGIN_URL = '/saml2/sp/login/' SESSION_EXPIRE_AT_BROWSER_CLOSE = True -def asgard_sp_config(request): - return { +def asgard_sp_config(request=None): + host = "localhost" + if request != None: + host = request.get_host().replace(":","-") + return { # your entity id, usually your subdomain plus the url to the metadata view 'entityid': 'https://coip.app.nordu.net/saml2/sp/metadata', # directory with attribute mapping -- cgit v1.1