def common_logout(request): auth_type = request.session.get('auth_type', None) if 'webauth' == auth_type: logout(request) wll = get_window_live_login() return HttpResponseRedirect('http://login.live.com/logout.srf?appid=%s' % wll.getAppId()) else: #openid and plain old auth return do_signout(request)
def common_login(request): next = clean_next(request.GET.get('next', '')) wll = get_window_live_login() return render_to_response('common_login.html', {'form_auth': OpenidAuthForm(initial={'next': next}), 'form_google': OpenidSigninForm(initial={'next': next}), 'webauth_appid': wll.getAppId(), 'webauth_controlstyle': settings_webauth.CONTROLSTYLE, }, context_instance=RequestContext(request))