diff options
-rw-r--r-- | asgard/settings.d/20-saml.conf | 11 | ||||
-rw-r--r-- | templates/djangosaml2/wayf.html | 16 |
2 files changed, 25 insertions, 2 deletions
diff --git a/asgard/settings.d/20-saml.conf b/asgard/settings.d/20-saml.conf index 3dc3349..833c21f 100644 --- a/asgard/settings.d/20-saml.conf +++ b/asgard/settings.d/20-saml.conf @@ -7,6 +7,13 @@ AUTH_PROFILE_MODULE = 'userprofile.UserProfile' #SAML_KEY = "/etc/ssl/private/ssl-cert-snakeoil.key" #SAML_CERT = "/etc/ssl/certs/ssl-cert-snakeoil.pem" +SAML_ATTRIBUTE_MAPPING = { + 'eduPersonPrincipalName': 'username', + 'mail': 'email', + 'givenName': 'first_name', + 'sn': 'last_name', +} + LOGIN_URL = '/saml2/sp/login/' SESSION_EXPIRE_AT_BROWSER_CLOSE = True @@ -28,13 +35,13 @@ def asgard_sp_config(request=None): # url and binding to the assertion consumer service view # do not change the binding osettingsr service name 'assertion_consumer_service': [ - ('https://coip.app.nordu.net/saml2/acs/', + ('https://coip.app.nordu.net/saml2/sp/acs/', BINDING_HTTP_POST), ], # url and binding to the single logout service view # do not change the binding or service name 'single_logout_service': [ - ('https://coip.app.nordu.net/saml2/ls/', + ('https://coip.app.nordu.net/saml2/sp/ls/', BINDING_HTTP_REDIRECT), ], }, diff --git a/templates/djangosaml2/wayf.html b/templates/djangosaml2/wayf.html new file mode 100644 index 0000000..60b07f0 --- /dev/null +++ b/templates/djangosaml2/wayf.html @@ -0,0 +1,16 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + </head> + <body> + <h1>Login!</h1> + <p>Please select your <strong>Identity Provider</strong> from the following list:</p> + <ul> + {% for url, idp in available_idps %} + <li><a href="{% url djangosaml2.views.login %}?idp={{ url }}{% if came_from %}&next={{ came_from }}{% endif %}">{{ idp[0] }}</a></li> + {% endfor %} + </ul> + </body> +</html> |