@ -157,7 +157,7 @@ REST_FRAMEWORK = {
}
SWAGGER_SETTINGS = {
'DEFAULT_AUTHENTICATION': 'authorization.backends.JWTAuthentication',
'DEFAULT_AUTHENTICATION': 'jwtauth.backends.JWTAuthentication',
'SECURITY_DEFINITIONS': {
'Token': {
'type': 'apiKey',
@ -55,7 +55,7 @@ class LoginSerializer(serializers.Serializer):
'A password is required to log in'
)
user = authenticate(email=email, password=password)
user = authenticate(username=email, password=password)
if user is None:
raise serializers.ValidationError(