summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asgard/settings.d/20-saml.conf7
1 files 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