Revision e24d0e0d
b/snf-astakos-app/astakos/im/messages.py | ||
---|---|---|
94 | 94 |
SHIBBOLETH_EMAIL_USED = 'This email is already associated with another shibboleth account.' |
95 | 95 |
SHIBBOLETH_INACTIVE_ACC = 'This email is already associated with an inactive account. \ |
96 | 96 |
You need to wait to be activated before being able to switch to a shibboleth account.' |
97 |
SHIBBOLETH_MISSING_EPPN = 'Missing unique token in request.' |
|
97 |
SHIBBOLETH_MISSING_EPPN = 'Your request is missing a unique ' + \ |
|
98 |
'token. This means your academic ' + \ |
|
99 |
'institution does not yet allow its users to log ' + \ |
|
100 |
'into %(domain)s with their academic ' + \ |
|
101 |
'credentials. Please contact %(contact_email)s' + \ |
|
102 |
' for more information.' |
|
98 | 103 |
SHIBBOLETH_MISSING_NAME = 'Missing user name in request.' |
99 | 104 |
|
100 | 105 |
SIGN_TERMS = 'You have to agree with the terms.' |
b/snf-astakos-app/astakos/im/target/shibboleth.py | ||
---|---|---|
86 | 86 |
try: |
87 | 87 |
eppn = tokens.get(Tokens.SHIB_EPPN) |
88 | 88 |
if not eppn: |
89 |
raise KeyError(_(astakos_messages.SHIBBOLETH_MISSING_EPPN)) |
|
89 |
raise KeyError(_(astakos_messages.SHIBBOLETH_MISSING_EPPN) % { |
|
90 |
'domain': settings.BASEURL, |
|
91 |
'contact_email': settings.DEFAULT_CONTACT_EMAIL |
|
92 |
}) |
|
90 | 93 |
if Tokens.SHIB_DISPLAYNAME in tokens: |
91 | 94 |
realname = tokens[Tokens.SHIB_DISPLAYNAME] |
92 | 95 |
elif Tokens.SHIB_CN in tokens: |
b/snf-astakos-app/astakos/im/tests.py | ||
---|---|---|
152 | 152 |
# shibboleth views validation |
153 | 153 |
# eepn required |
154 | 154 |
r = client.get('/im/login/shibboleth?', follow=True) |
155 |
self.assertContains(r, messages.SHIBBOLETH_MISSING_EPPN) |
|
155 |
self.assertContains(r, messages.SHIBBOLETH_MISSING_EPPN % { |
|
156 |
'domain': astakos_settings.BASEURL, |
|
157 |
'contact_email': astakos_settings.DEFAULT_CONTACT_EMAIL |
|
158 |
}) |
|
156 | 159 |
client.set_tokens(eppn="kpapeppn") |
157 | 160 |
|
158 | 161 |
astakos_settings.SHIBBOLETH_REQUIRE_NAME_INFO = True |
Also available in: Unified diff