mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-30 05:25:06 +02:00
Pylint was not installed and wrongly configured. After making it work, we fix all the issues found so it can be added to our CI requirements.
15 lines
344 B
Python
15 lines
344 B
Python
"""
|
|
Utils that can be useful throughout the People core app
|
|
"""
|
|
from rest_framework_simplejwt.tokens import RefreshToken
|
|
|
|
|
|
def get_tokens_for_user(user):
|
|
"""Get JWT tokens for user authentication."""
|
|
refresh = RefreshToken.for_user(user)
|
|
|
|
return {
|
|
"refresh": str(refresh),
|
|
"access": str(refresh.access_token),
|
|
}
|