fnp
/
django-cas-provider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a3d45d3
)
Added identifier history support to CAS 2.0 validation. `signals.on_cas_collect_histo...
author
deyk
<deyk@crossway.org>
Mon, 16 Apr 2012 23:48:37 +0000
(16:48 -0700)
committer
deyk
<deyk@crossway.org>
Mon, 16 Apr 2012 23:48:37 +0000
(16:48 -0700)
cas_provider/views.py
patch
|
blob
|
history
diff --git
a/cas_provider/views.py
b/cas_provider/views.py
index
68e6784
..
be6c4d4
100644
(file)
--- a/
cas_provider/views.py
+++ b/
cas_provider/views.py
@@
-169,7
+169,7
@@
def validate(request):
username = ticket.user.username
ticket.delete()
username = ticket.user.username
ticket.delete()
- results = signals.on_cas_collect_histories.send(sender=validate, for_
email=ticket.user.email
)
+ results = signals.on_cas_collect_histories.send(sender=validate, for_
user=ticket.user
)
histories = '\n'.join('\n'.join(rs) for rc, rs in results)
logger.info('Validated %s %s', username, "(also %s)" % histories if histories else '')
return HttpResponse("yes\n%s\n%s" % (username, histories))
histories = '\n'.join('\n'.join(rs) for rc, rs in results)
logger.info('Validated %s %s', username, "(also %s)" % histories if histories else '')
return HttpResponse("yes\n%s\n%s" % (username, histories))
@@
-341,6
+341,8
@@
def auth_success_response(user, pgt, proxies):
if custom:
attrs.update(custom)
if custom:
attrs.update(custom)
+ attrs['identifiers'] = [i for r, i in signals.on_cas_collect_histories.send(sender=validate, for_user=user)]
+
if attrs:
formatter = get_callable(settings.CAS_CUSTOM_ATTRIBUTES_FORMATER)
formatter(auth_success, attrs)
if attrs:
formatter = get_callable(settings.CAS_CUSTOM_ATTRIBUTES_FORMATER)
formatter(auth_success, attrs)