Fix up some SAML issues

* Fix an issue I created overriding authenticate
* Fix up attribute mapping using an identity provider class.  The
  methods built into django-social-auth for saml are probably not going
  to work.  We also now expose those mappings in a settings attrs map
  that the user can override.
This commit is contained in:
Matthew Jones
2015-11-10 11:57:37 -05:00
parent 60a2787468
commit fdc9979595
3 changed files with 36 additions and 4 deletions

View File

@@ -387,6 +387,14 @@ SOCIAL_AUTH_SAML_TECHNICAL_CONTACT = {}
SOCIAL_AUTH_SAML_SUPPORT_CONTACT = {}
SOCIAL_AUTH_SAML_ENABLED_IDPS = {}
SOCIAL_AUTH_SAML_ATTRS_PERMANENT_ID = "name_id"
SOCIAL_AUTH_SAML_ATTRS_MAP = {
"first_name": "User.FirstName",
"last_name": "User.LastName",
"username": "User.email",
"email": "User.email",
}
SOCIAL_AUTH_LOGIN_URL = '/'
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/sso/complete/'
SOCIAL_AUTH_LOGIN_ERROR_URL = '/sso/error/'