def test_recovery_login_works(self): token = self.user.create_token(token_type=AUTH_TOKEN) self.request.GET['token'] = token.value ViewClass = RecoveryLoginView.as_view() ViewClass(self.request) assert_equals(self.request.entree_user, self.user)
def test_recovery_login_works(self): token = self.user.create_token(token_type=AUTH_TOKEN) self.request.GET['token'] = token.value ViewClass = RecoveryLoginView.as_view() ViewClass(self.request) assert_equals(self.request.entree_user, self.user)
from django.conf.urls import patterns, url from entree.enauth.views import ( CreateIdentityView, LoginView, IdentityVerifyView, LogoutView, LoginHashView, IdentityVerifyResend, RecoveryLoginView, PasswordResetView, PasswordRecoveryRequestView, FinishRecoveryView, PasswordChangeView, ShowApiView) #TODO - cleanup urlpatterns = patterns('entree.enauth.views', url(r'^api/show/(?P<site_id>\d+)/$', ShowApiView.as_view(), name='api_show'), url(r'^api/show/$', ShowApiView.as_view(), name='api_show'), url(r'^iframe-login/$', LoginHashView.as_view(), name='login_hash'), url(r'^login/recovery/(?P<origin_site>\d+)/$', RecoveryLoginView.as_view(), name='login-recovery'), url(r'^login/$', LoginView.as_view(), name='login'), # dummy url url(r'^login/(?P<origin_site>\d+)/$', LoginView.as_view(), name='login'), url(r'^login/(?P<origin_site>\d+)/(?P<next_url>\S+)/$', LoginView.as_view(), name='login'), url(r'^logout/$', LogoutView.as_view(), name='logout'), # dummy url url(r'^logout/(?P<origin_site>\d+)/$', LogoutView.as_view(), name='logout'), url(r'^logout/(?P<origin_site>\d+)/(?P<next_url>\S+)/$', LogoutView.as_view(), name='logout'), url(r'^register/$', CreateIdentityView.as_view(), name='register'), # dummy url url(r'^register/(?P<origin_site>\d+)/$', CreateIdentityView.as_view(), name='register'), url(r'^register/(?P<origin_site>\d+)/(?P<next_url>\S+)/$', CreateIdentityView.as_view(), name='create_identity'), #each of these urls below should start w/ the same string #there's middleware which controls inactive account if: url.startswith(reverse('verify_identity')) url(r'^verify/$', IdentityVerifyView.as_view(), name='verify_identity'), url(r'^verify/(?P<email>[A-Za-z0-9=]+)/(?P<token>\w+)/$', IdentityVerifyView.as_view(), name='verify_identity'),
from entree.enauth.views import ( CreateIdentityView, LoginView, IdentityVerifyView, LogoutView, LoginHashView, IdentityVerifyResend, RecoveryLoginView, PasswordResetView, PasswordRecoveryRequestView, FinishRecoveryView, PasswordChangeView, ShowApiView) #TODO - cleanup urlpatterns = patterns( 'entree.enauth.views', url(r'^api/show/(?P<site_id>\d+)/$', ShowApiView.as_view(), name='api_show'), url(r'^api/show/$', ShowApiView.as_view(), name='api_show'), url(r'^iframe-login/$', LoginHashView.as_view(), name='login_hash'), url(r'^login/recovery/(?P<origin_site>\d+)/$', RecoveryLoginView.as_view(), name='login-recovery'), url(r'^login/$', LoginView.as_view(), name='login'), #dummy url url(r'^login/(?P<origin_site>\d+)/$', LoginView.as_view(), name='login'), url(r'^login/(?P<origin_site>\d+)/(?P<next_url>\S+)/$', LoginView.as_view(), name='login'), url(r'^logout/$', LogoutView.as_view(), name='logout'), #dummy url url(r'^logout/(?P<origin_site>\d+)/$', LogoutView.as_view(), name='logout'), url(r'^logout/(?P<origin_site>\d+)/(?P<next_url>\S+)/$', LogoutView.as_view(), name='logout'), url(r'^register/$', CreateIdentityView.as_view(), name='register'), #dummy url url(r'^register/(?P<origin_site>\d+)/$',