0001-auth_saml-allow-custom-template-for-each-idp-login-b.patch
src/authentic2_auth_saml/authenticators.py | ||
---|---|---|
35 | 35 | |
36 | 36 |
def instances(self, request, *args, **kwargs): |
37 | 37 |
for idx, idp in enumerate(get_idps()): |
38 |
yield(idx, idp)
|
|
38 |
yield (idp.get('SLUG') or idx, idp)
|
|
39 | 39 | |
40 | 40 |
def login(self, request, *args, **kwargs): |
41 | 41 |
context = kwargs.pop('context', {}) |
... | ... | |
46 | 46 |
instance = kwargs.get('instance') |
47 | 47 |
return redirect_to_login(request, login_url='mellon_login', |
48 | 48 |
params={'entityID': instance['ENTITY_ID']}) |
49 |
return render(request, 'authentic2_auth_saml/login.html', context) |
|
49 |
return render(request, ['authentic2_auth_saml/login-%s.html' % instance_id, |
|
50 |
'authentic2_auth_saml/login.html'], context) |
|
50 | 51 | |
51 | 52 |
def profile(self, request, *args, **kwargs): |
52 | 53 |
context = kwargs.pop('context', {}) |
53 |
- |