rest_auth.views¶
Views for authentication
In this views, authentication views are composited with GenericAPIView (of rest_framework) and mixins, which is implemented for process views.
Because, we didn’t know what methods you use for process business logics. You can construct your own views by extending our mixins.
(rest_framework’s generic views used this strategy)
-
class
rest_auth.views.
LoginMixin
[source]¶ Mixin for logging-in
-
response_includes_data
= False¶ Set this to
True
if you wanna send user data (or more) when authentication is successful. (default:False
)
-
serializer_class
¶
-
login
(request, *args, **kwargs)[source]¶ Main business logic for loggin in
Raises: ValidationError – auth failed, but it will be handled by rest_frameworks error handler.
-
-
class
rest_auth.views.
PasswordForgotMixin
[source]¶ View for sending password-reset-link.
-
serializer_class
¶
-
-
class
rest_auth.views.
PasswordForgotConfirmView
(**kwargs)[source]¶ django-rest-auth’s password reset confirmation just adopts django’s one. This idea is under assumption, which password reset confirmation should be done, by clicking password-reset-url we sent and moving to webpage to change password.
-
class
rest_auth.views.
PasswordResetDoneView
(**kwargs)[source]¶ adopts django’s password reset complete view.