login

jwt_allauth.login.serializers module

class jwt_allauth.login.serializers.LoginSerializer(*args, **kwargs)[source]

Bases: TokenObtainPairSerializer

classmethod get_token(user) RefreshToken[source]

Instantiates a new TokenObtainPairSerializer object, sets a token for the given user and returns the token.

token_class

alias of RefreshToken

user = None
username_field = 'email'
validate(attrs: Dict[str, Any]) Dict[Any, Any][source]
jwt_allauth.login.serializers.get_mfa_totp_mode() str[source]

Return the current MFA TOTP mode from settings.

This must be evaluated at call time (not import time) so that Django’s override_settings used in tests – and any runtime changes – are respected.

jwt_allauth.login.views module

class jwt_allauth.login.views.LoginView(**kwargs)[source]

Bases: TokenObtainPairView

dispatch(*args, **kwargs)[source]

.dispatch() is pretty much the same as Django’s regular dispatch, but with extra hooks for startup, finalize, and exception handling.

post(request, *args, **kwargs)
serializer_class

alias of LoginSerializer

throttle_classes = [<class 'rest_framework.throttling.AnonRateThrottle'>]