equal
deleted
inserted
replaced
|
1 --- D:/CavalieT/My Documents/Flex Builder 3/platform_diane/platform/virtualenv/web/res/src/omab-django-social-auth-v0.3.8-9-g5d610a5/omab-django-social-auth-5d610a5/social_auth/views.py lun. mars 28 12:03:45 2011 |
|
2 +++ D:/CavalieT/My Documents/Flex Builder 3/platform_diane/platform/virtualenv/web/env/myplatformenv/Lib/site-packages/django_social_auth-0.3.8-py2.6.egg/social_auth/views.py ven. avr. 8 12:06:02 2011 |
|
3 @@ -7,13 +7,27 @@ |
|
4 from django.contrib.auth import login, REDIRECT_FIELD_NAME |
|
5 from django.contrib.auth.decorators import login_required |
|
6 |
|
7 -from social_auth.backends import get_backend |
|
8 +from social_auth.backends import get_backend, get_backends |
|
9 from social_auth.utils import sanitize_redirect |
|
10 |
|
11 |
|
12 DEFAULT_REDIRECT = getattr(settings, 'LOGIN_REDIRECT_URL', '') |
|
13 |
|
14 +#TC |
|
15 +def list(): |
|
16 + """Start list process""" |
|
17 + log_url = getattr(settings, 'LOGIN_URL', '') |
|
18 + response = "<ul>" |
|
19 + # We list all wanted backends among all availables |
|
20 + for backend in get_backends(): |
|
21 + for backend_str in settings.AUTHENTICATION_BACKENDS: |
|
22 + if backend in backend_str: |
|
23 + response += "<li><a href=\"" + log_url + backend + "\">" + backend + "</a></li>" |
|
24 + response += "</ul>" |
|
25 + return response |
|
26 +#END change by TC |
|
27 |
|
28 + |
|
29 def auth(request, backend): |
|
30 """Start authentication process""" |
|
31 complete_url = getattr(settings, 'SOCIAL_AUTH_COMPLETE_URL_NAME', |