Features: 1) Introduce retrieve_user attribute in TokenObtainPairSerializer initializer;
Fixes: None; Extra: None;
This commit is contained in:
parent
ecd6e5ad9f
commit
c581534a3b
1 changed files with 5 additions and 0 deletions
|
|
@ -171,6 +171,11 @@ class TokenObtainSerializer(Serializer):
|
|||
class TokenObtainPairSerializer(TokenObtainSerializer):
|
||||
token_class = RefreshToken
|
||||
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.retrieve_user: bool = kwargs.get("retrieve_user", True)
|
||||
|
||||
def validate(self, attrs: dict[str, Any]) -> dict[str, str]:
|
||||
data = super().validate(attrs)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue