from rest_framework_simplejwt.serializers import TokenObtainPairSerializer
from rest_framework_simplejwt.views import TokenObtainPairView

class MyTokenObtainPairSerializer(TokenObtainPairSerializer):
    @classmethod
    def get_token(cls, user):
        token = super().get_token(user)

        # Add custom claims
        token['name'] = user.id
        token['expiry12'] = 12
        print(token)
        # ...
        data = {
                    "token": token,
                    "users": user.username,
                }
        return token

class MyTokenObtainPairView(TokenObtainPairView):
    print("HEYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY")
    serializer_class = MyTokenObtainPairSerializer