title: I am getting some problem while login from jwt token, I can get token but getting some problem as authentication not provided ? In Django from API
body: <p>I am getting some problems while logging the user. I can get proper tokens also but can't authenticate that.</p>
  <p><a href="https://i.stack.imgur.com/zyCrC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zyCrC.png" alt="enter image description here" /></a></p>
  <p>I am Getting an Error as Below also while getting the token too.</p>
  <p><a href="https://i.stack.imgur.com/R25wX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R25wX.png" alt="enter image description here" /></a></p>
  <pre><code>HTTP 401 Unauthorized
  
  Allow: GET, HEAD, OPTIONS
  
  Content-Type: application/json
  
  Vary: Accept
  
  WWW-Authenticate: JWT realm=&quot;api&quot;
  {
  
      &quot;detail&quot;: &quot;Authentication credentials were not provided.&quot;
  }
  </code></pre>
  <p><strong>In setting.py</strong></p>
  <pre><code>INSTALLED_APPS = [
  
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'webapi.apps.WebapiConfig',
      'corsheaders',
      'rest_framework',
      'ratings',
      # 'rest_framework.authtoken',
      'rest_framework_simplejwt',
      'rest_framework_simplejwt.token_blacklist',
      'rest_auth',
      'phone_field',
      'phonenumber_field',
      'djoser',
      'users.apps.UsersConfig',
  ]
  
  REST_FRAMEWORK = {
  
      'DEFAULT_PERMISSION_CLASSES': (
          'rest_framework.permissions.AllowAny',
      ),
      'DEFAULT_AUTHENTICATION_CLASSES': (
          'rest_framework_simplejwt.authentication.JWTAuthentication',
      )
  }
  
  SIMPLE_JWT = {
  
      'ACCESS_TOKEN_LIFETIME': timedelta(minutes=5),
      'REFRESH_TOKEN_LIFETIME': timedelta(days=1),
      'ROTATE_REFRESH_TOKENS': True,
      'BLACKLIST_AFTER_ROTATION': True,
      'UPDATE_LAST_LOGIN': False,
  
      'ALGORITHM': 'HS256',
      'SIGNING_KEY': SECRET_KEY,
      'VERIFYING_KEY': None,
      'AUDIENCE': None,
      'ISSUER': None,
      'JWK_URL': None,
      'LEEWAY': 0,
  
      'AUTH_HEADER_TYPES': ('JWT',),
      'AUTH_HEADER_NAME': 'HTTP_AUTHORIZATION',
      'USER_ID_FIELD': 'id',
      'USER_ID_CLAIM': 'user_id',
      'USER_AUTHENTICATION_RULE': 'rest_framework_simplejwt.authentication.default_user_authentication_rule',
  
      'AUTH_TOKEN_CLASSES': ('rest_framework_simplejwt.tokens.AccessToken',),
      'TOKEN_TYPE_CLAIM': 'token_type',
  
      'JTI_CLAIM': 'jti',
  
      'SLIDING_TOKEN_REFRESH_EXP_CLAIM': 'refresh_exp',
      'SLIDING_TOKEN_LIFETIME': timedelta(minutes=5),
      'SLIDING_TOKEN_REFRESH_LIFETIME': timedelta(days=1),
  }
  </code></pre>
  <p><strong>At urls.py</strong></p>
  <pre><code>from rest_framework_simplejwt.views import (
      TokenObtainPairView,
      TokenRefreshView,
      TokenVerifyView,
  )
  
  urlpatterns = [
  
      path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
      path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
      path('token/verify/', TokenVerifyView.as_view(), name='token_verify'),
  ]
  
  </code></pre>