From: deyk Date: Wed, 11 Apr 2012 20:33:54 +0000 (-0700) Subject: Removed `views.socialauth_login`, as `views.login` now has feature parity. X-Git-Tag: 22.4~36 X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/commitdiff_plain/0b76f6154ffb5fabd7c0cd22ff3f2720cedeb48f?ds=inline Removed `views.socialauth_login`, as `views.login` now has feature parity. --- diff --git a/cas_provider/views.py b/cas_provider/views.py index 5f457bd..fdae99f 100644 --- a/cas_provider/views.py +++ b/cas_provider/views.py @@ -116,29 +116,6 @@ def login(request, template_name='cas/login.html', success_redirect='/account/', return render_to_response(template_name, {'form': form, 'errors': errors}, context_instance=RequestContext(request)) -def socialauth_login(request, template_name='cas/login.html', success_redirect='/account/'): - """ Similiar to login but user has been authenticated already through social auth. - This step authenticates the login and generates a service ticket. - """ - user = request.user - user.backend = 'django.contrib.auth.backends.ModelBackend' - service = request.session.pop('service', '/') - errors = [] - if user is not None: - if user.is_active: - auth_login(request, user) - if service is not None: - ticket = create_service_ticket(user, service) - return HttpResponseRedirect(_build_service_url(service, ticket.ticket)) - else: - return HttpResponseRedirect(success_redirect) - else: - errors.append('This account is disabled.') - else: - errors.append('Incorrect username and/or password.') - return render_to_response(template_name, {'errors': errors}, context_instance=RequestContext(request)) - - def validate(request): service = request.GET.get('service', None) ticket_string = request.GET.get('ticket', None)