├── .coveragerc ├── .github ├── dependabot.yaml └── workflows │ ├── i18n.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .readthedocs.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.rst ├── LICENSE.txt ├── MANIFEST.in ├── Makefile ├── README.rst ├── codecov.yml ├── docs ├── Makefile ├── blacklist_app.rst ├── conf.py ├── creating_tokens_manually.rst ├── customizing_token_claims.rst ├── development_and_contributing.rst ├── drf_yasg_integration.rst ├── getting_started.rst ├── index.rst ├── rest_framework_simplejwt.rst ├── settings.rst ├── stateless_user_authentication.rst └── token_types.rst ├── inlang.config.js ├── licenses ├── LICENSE-django-rest-framework-jwt └── LICENSE-django-rest-framework.md ├── pytest.ini ├── rest_framework_simplejwt ├── __init__.py ├── authentication.py ├── backends.py ├── exceptions.py ├── locale │ ├── ar │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── cs │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── de │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── es │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── es_AR │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── es_CL │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── fa │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── fa_IR │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── fr │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── he_IL │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── id_ID │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── it_IT │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── ko_KR │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── nl_NL │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── pl_PL │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── pt_BR │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── ro │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── ru_RU │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── sl │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── sv │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── tr │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── uk_UA │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ └── zh_Hans │ │ └── LC_MESSAGES │ │ ├── django.mo │ │ └── django.po ├── models.py ├── py.typed ├── serializers.py ├── settings.py ├── state.py ├── token_blacklist │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ └── flushexpiredtokens.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_outstandingtoken_jti_hex.py │ │ ├── 0003_auto_20171017_2007.py │ │ ├── 0004_auto_20171017_2013.py │ │ ├── 0005_remove_outstandingtoken_jti.py │ │ ├── 0006_auto_20171017_2113.py │ │ ├── 0007_auto_20171017_2214.py │ │ ├── 0008_migrate_to_bigautofield.py │ │ ├── 0010_fix_migrate_to_bigautofield.py │ │ ├── 0011_linearizes_history.py │ │ ├── 0012_alter_outstandingtoken_user.py │ │ ├── 0013_alter_blacklistedtoken_options_and_more.py │ │ └── __init__.py │ └── models.py ├── tokens.py ├── utils.py └── views.py ├── scripts └── i18n_updater.py ├── setup.cfg ├── setup.py ├── tests ├── __init__.py ├── conftest.py ├── keys.py ├── models.py ├── test_authentication.py ├── test_backends.py ├── test_init.py ├── test_integration.py ├── test_migrations.py ├── test_models.py ├── test_serializers.py ├── test_token_blacklist.py ├── test_tokens.py ├── test_utils.py ├── test_views.py ├── urls.py ├── utils.py └── views.py └── tox.ini /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = 3 | rest_framework_simplejwt/token_blacklist/admin.py 4 | rest_framework_simplejwt/token_blacklist/apps.py 5 | -------------------------------------------------------------------------------- /.github/dependabot.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | assignees: 8 | - "djangorestframework-simplejwt" 9 | labels: 10 | - "dependencies" 11 | -------------------------------------------------------------------------------- /.github/workflows/i18n.yml: -------------------------------------------------------------------------------- 1 | name: Update locale files 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | 9 | jobs: 10 | locale-updater: 11 | permissions: 12 | pull-requests: write 13 | contents: write 14 | if: github.repository == 'jazzband/djangorestframework-simplejwt' 15 | name: Locale updater 16 | runs-on: ubuntu-latest 17 | steps: 18 | 19 | - name: Checkout Repository 20 | uses: actions/checkout@v4 21 | 22 | - name: Set up Python 23 | uses: actions/setup-python@v5 24 | with: 25 | python-version: '3.12' 26 | cache: 'pip' 27 | cache-dependency-path: setup.py 28 | 29 | - name: Install dependencies 30 | run: | 31 | sudo apt-get install -y gettext 32 | python -m pip install --upgrade pip wheel setuptools 33 | pip install -e .[dev] 34 | 35 | - name: Run locale Update Script 36 | working-directory: 37 | rest_framework_simplejwt 38 | run: python ../scripts/i18n_updater.py 39 | 40 | - name: Create Pull Request 41 | uses: peter-evans/create-pull-request@v7 42 | with: 43 | branch: i18n-auto-update 44 | title: "[i18n] Update" 45 | body: "Updated locale files on trunk" 46 | commit-message: "Update locale files" 47 | add-paths: rest_framework_simplejwt/locale/** 48 | delete-branch: true 49 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | build: 10 | if: github.repository == 'jazzband/djangorestframework-simplejwt' 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v4 15 | with: 16 | fetch-depth: 0 17 | 18 | - name: Set up Python 19 | uses: actions/setup-python@v5 20 | with: 21 | python-version: '3.9' 22 | 23 | - name: Install dependencies 24 | run: | 25 | sudo apt-get install -y gettext 26 | python -m pip install -U pip 27 | python -m pip install -U setuptools twine wheel 28 | pip install -e .[dev] 29 | 30 | - name: Check locale 31 | working-directory: rest_framework_simplejwt 32 | run: | 33 | echo "Checking if locale files need updating. If they do, cd rest_framework_simplejwt && run python ../scripts/i18n_updater.py" 34 | python ../scripts/i18n_updater.py 35 | git diff --exit-code 36 | 37 | - name: Build package 38 | run: | 39 | python setup.py --version 40 | python setup.py sdist --format=gztar bdist_wheel 41 | twine check dist/* 42 | 43 | - name: Upload packages to Jazzband 44 | if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') 45 | uses: pypa/gh-action-pypi-publish@release/v1 46 | with: 47 | user: jazzband 48 | password: ${{ secrets.JAZZBAND_RELEASE_KEY }} 49 | repository_url: https://jazzband.co/projects/djangorestframework-simplejwt/upload 50 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | pull_request: 9 | 10 | jobs: 11 | build: 12 | name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}, DRF ${{ matrix.drf-version }}) 13 | runs-on: ubuntu-latest 14 | strategy: 15 | fail-fast: false 16 | max-parallel: 5 17 | matrix: 18 | python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] 19 | django-version: ['4.2', '5.0', '5.1', '5.2'] 20 | drf-version: ['3.14', '3.15'] 21 | exclude: 22 | - drf-version: '3.14' 23 | django-version: '5.0' 24 | - drf-version: '3.14' 25 | django-version: '5.1' 26 | 27 | steps: 28 | - uses: actions/checkout@v4 29 | 30 | - name: Set up Python ${{ matrix.python-version }} 31 | uses: actions/setup-python@v5 32 | with: 33 | python-version: ${{ matrix.python-version }} 34 | 35 | - name: Get pip cache dir 36 | id: pip-cache 37 | run: | 38 | echo "::set-output name=dir::$(pip cache dir)" 39 | 40 | - name: Cache 41 | uses: actions/cache@v4 42 | with: 43 | path: ${{ steps.pip-cache.outputs.dir }} 44 | key: 45 | ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }} 46 | restore-keys: | 47 | ${{ matrix.python-version }}-v1- 48 | 49 | - name: Install dependencies 50 | run: | 51 | python -m pip install --upgrade pip 52 | python -m pip install --upgrade tox tox-gh-actions 53 | 54 | - name: Tox tests 55 | run: | 56 | tox -v 57 | env: 58 | DJANGO: ${{ matrix.django-version }} 59 | DRF: ${{ matrix.drf-version }} 60 | 61 | - name: Upload coverage 62 | uses: codecov/codecov-action@v5 63 | with: 64 | name: Python ${{ matrix.python-version }} 65 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | # *.mo Needs to come with the package 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 98 | __pypackages__/ 99 | 100 | # Celery stuff 101 | celerybeat-schedule 102 | celerybeat.pid 103 | 104 | # SageMath parsed files 105 | *.sage.py 106 | 107 | # Environments 108 | .env 109 | .venv 110 | env/ 111 | venv/ 112 | ENV/ 113 | env.bak/ 114 | venv.bak/ 115 | .idea/ 116 | 117 | # Spyder project settings 118 | .spyderproject 119 | .spyproject 120 | 121 | # Rope project settings 122 | .ropeproject 123 | 124 | # mkdocs documentation 125 | /site 126 | 127 | # mypy 128 | .mypy_cache/ 129 | .dmypy.json 130 | dmypy.json 131 | 132 | # Pyre type checker 133 | .pyre/ 134 | 135 | # pytype static type analyzer 136 | .pytype/ 137 | 138 | # Cython debug symbols 139 | cython_debug/ 140 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/pre-commit-hooks 3 | rev: 'v5.0.0' 4 | hooks: 5 | - id: check-merge-conflict 6 | - repo: https://github.com/astral-sh/ruff-pre-commit 7 | rev: v0.9.10 8 | hooks: 9 | - id: ruff 10 | types_or: [ python, pyi ] 11 | args: [--select, I, --fix,] 12 | files: "^tests/|^rest_framework_simplejwt/" 13 | - id: ruff-format 14 | types_or: [python, pyi] 15 | files: "^tests/|^rest_framework_simplejwt/" 16 | - repo: https://github.com/asottile/yesqa 17 | rev: v1.5.0 18 | hooks: 19 | - id: yesqa 20 | - repo: https://github.com/pre-commit/pre-commit-hooks 21 | rev: 'v5.0.0' 22 | hooks: 23 | - id: end-of-file-fixer 24 | exclude: >- 25 | ^docs/[^/]*\.svg$ 26 | - id: requirements-txt-fixer 27 | - id: trailing-whitespace 28 | types: [python] 29 | - id: file-contents-sorter 30 | files: | 31 | CONTRIBUTORS.txt| 32 | docs/spelling_wordlist.txt| 33 | .gitignore| 34 | .gitattributes 35 | - id: check-case-conflict 36 | - id: check-json 37 | - id: check-xml 38 | - id: check-executables-have-shebangs 39 | - id: check-toml 40 | - id: check-xml 41 | - id: check-yaml 42 | - id: debug-statements 43 | - id: check-added-large-files 44 | - id: check-symlinks 45 | - id: debug-statements 46 | - id: detect-aws-credentials 47 | args: ['--allow-missing-credentials'] 48 | - id: detect-private-key 49 | exclude: ^tests/ 50 | - repo: https://github.com/asottile/pyupgrade 51 | rev: 'v3.19.1' 52 | hooks: 53 | - id: pyupgrade 54 | args: ['--py39-plus', '--keep-mock'] 55 | 56 | - repo: https://github.com/Lucas-C/pre-commit-hooks-markup 57 | rev: v1.0.1 58 | hooks: 59 | - id: rst-linter 60 | files: >- 61 | ^[^/]+[.]rst$ 62 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | # Set the version of Python and other tools you might need 4 | build: 5 | os: ubuntu-22.04 6 | tools: 7 | python: "3.12" 8 | 9 | python: 10 | install: 11 | # Install dependencies from setup.py . 12 | - method: pip 13 | path: . 14 | extra_requirements: 15 | - dev 16 | 17 | # Build documentation in the docs/ directory with Sphinx 18 | sphinx: 19 | configuration: docs/conf.py 20 | 21 | # If using Sphinx, optionally build your docs in additional formats such as PDF 22 | formats: 23 | - pdf 24 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | As contributors and maintainers of the Jazzband projects, and in the interest of 4 | fostering an open and welcoming community, we pledge to respect all people who 5 | contribute through reporting issues, posting feature requests, updating documentation, 6 | submitting pull requests or patches, and other activities. 7 | 8 | We are committed to making participation in the Jazzband a harassment-free experience 9 | for everyone, regardless of the level of experience, gender, gender identity and 10 | expression, sexual orientation, disability, personal appearance, body size, race, 11 | ethnicity, age, religion, or nationality. 12 | 13 | Examples of unacceptable behavior by participants include: 14 | 15 | - The use of sexualized language or imagery 16 | - Personal attacks 17 | - Trolling or insulting/derogatory comments 18 | - Public or private harassment 19 | - Publishing other's private information, such as physical or electronic addresses, 20 | without explicit permission 21 | - Other unethical or unprofessional conduct 22 | 23 | The Jazzband roadies have the right and responsibility to remove, edit, or reject 24 | comments, commits, code, wiki edits, issues, and other contributions that are not 25 | aligned to this Code of Conduct, or to ban temporarily or permanently any contributor 26 | for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 27 | 28 | By adopting this Code of Conduct, the roadies commit themselves to fairly and 29 | consistently applying these principles to every aspect of managing the jazzband 30 | projects. Roadies who do not follow or enforce the Code of Conduct may be permanently 31 | removed from the Jazzband roadies. 32 | 33 | This code of conduct applies both within project spaces and in public spaces when an 34 | individual is representing the project or its community. 35 | 36 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by 37 | contacting the roadies at `roadies@jazzband.co`. All complaints will be reviewed and 38 | investigated and will result in a response that is deemed necessary and appropriate to 39 | the circumstances. Roadies are obligated to maintain confidentiality with regard to the 40 | reporter of an incident. 41 | 42 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 43 | 1.3.0, available at [https://contributor-covenant.org/version/1/3/0/][version] 44 | 45 | [homepage]: https://contributor-covenant.org 46 | [version]: https://contributor-covenant.org/version/1/3/0/ 47 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | .. image:: https://jazzband.co/static/img/jazzband.svg 2 | :target: https://jazzband.co/ 3 | :alt: Jazzband 4 | 5 | This is a `Jazzband `_ project. By contributing you agree to abide by the `Contributor Code of Conduct `_ and follow the `guidelines `_. 6 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2017 David Sanders 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | include LICENSE.txt 3 | include rest_framework_simplejwt/py.typed 4 | recursive-include rest_framework_simplejwt/locale *.mo 5 | recursive-include rest_framework_simplejwt/locale *.po 6 | recursive-exclude * __pycache__ 7 | recursive-exclude * *.py[co] 8 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean 2 | clean: clean-build clean-pyc 3 | 4 | .PHONY: clean-build 5 | clean-build: 6 | rm -fr build/ 7 | rm -fr dist/ 8 | rm -fr *.egg-info 9 | 10 | .PHONY: clean-pyc 11 | clean-pyc: 12 | find . -name '*.pyc' -exec rm -f {} + 13 | find . -name '*.pyo' -exec rm -f {} + 14 | find . -name '*~' -exec rm -f {} + 15 | 16 | .PHONY: lint 17 | lint: 18 | tox -e lint 19 | 20 | .PHONY: lint-roll 21 | lint-roll: 22 | isort rest_framework_simplejwt tests 23 | $(MAKE) lint 24 | 25 | .PHONY: tests 26 | test: 27 | pytest tests 28 | 29 | .PHONY: test-all 30 | test-all: 31 | tox 32 | 33 | .PHONY: build-docs 34 | build-docs: 35 | sphinx-apidoc -o docs/ . \ 36 | setup.py \ 37 | *confest* \ 38 | tests/* \ 39 | rest_framework_simplejwt/token_blacklist/* \ 40 | rest_framework_simplejwt/backends.py \ 41 | rest_framework_simplejwt/exceptions.py \ 42 | rest_framework_simplejwt/settings.py \ 43 | rest_framework_simplejwt/state.py 44 | $(MAKE) -C docs clean 45 | $(MAKE) -C docs html 46 | $(MAKE) -C docs doctest 47 | 48 | .PHONY: docs 49 | docs: build-docs 50 | open docs/_build/html/index.html 51 | 52 | .PHONY: linux-docs 53 | linux-docs: build-docs 54 | xdg-open docs/_build/html/index.html 55 | 56 | .PHONY: pushversion 57 | pushversion: 58 | git push upstream && git push upstream --tags 59 | 60 | .PHONY: publish 61 | publish: 62 | python setup.py sdist bdist_wheel 63 | twine upload dist/* 64 | 65 | .PHONY: dist 66 | dist: clean 67 | python setup.py sdist bdist_wheel 68 | ls -l dist 69 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Simple JWT 2 | ========== 3 | 4 | .. image:: https://jazzband.co/static/img/badge.svg 5 | :target: https://jazzband.co/ 6 | :alt: Jazzband 7 | .. image:: https://github.com/jazzband/djangorestframework-simplejwt/workflows/Test/badge.svg 8 | :target: https://github.com/jazzband/djangorestframework-simplejwt/actions 9 | :alt: GitHub Actions 10 | .. image:: https://codecov.io/gh/jazzband/djangorestframework-simplejwt/branch/master/graph/badge.svg 11 | :target: https://codecov.io/gh/jazzband/djangorestframework-simplejwt 12 | .. image:: https://img.shields.io/pypi/v/djangorestframework-simplejwt.svg 13 | :target: https://pypi.python.org/pypi/djangorestframework-simplejwt 14 | .. image:: https://img.shields.io/pypi/pyversions/djangorestframework-simplejwt.svg 15 | :target: https://pypi.python.org/pypi/djangorestframework-simplejwt 16 | .. image:: https://img.shields.io/pypi/djversions/djangorestframework-simplejwt.svg 17 | :target: https://pypi.python.org/pypi/djangorestframework-simplejwt 18 | .. image:: https://readthedocs.org/projects/django-rest-framework-simplejwt/badge/?version=latest 19 | :target: https://django-rest-framework-simplejwt.readthedocs.io/en/latest/ 20 | 21 | Abstract 22 | -------- 23 | 24 | Simple JWT is a JSON Web Token authentication plugin for the `Django REST 25 | Framework `__. 26 | 27 | For full documentation, visit `django-rest-framework-simplejwt.readthedocs.io 28 | `__. 29 | 30 | 31 | Translations 32 | ------------ 33 | 34 | Contribute translations directly with PRs or via inlang https://inlang.com/editor/github.com/jazzband/djangorestframework-simplejwt 35 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | informational: true 6 | patch: 7 | default: 8 | informational: true 9 | changes: false 10 | 11 | comment: off 12 | -------------------------------------------------------------------------------- /docs/blacklist_app.rst: -------------------------------------------------------------------------------- 1 | .. _blacklist_app: 2 | 3 | Blacklist app 4 | ============= 5 | 6 | Simple JWT includes an app that provides token blacklist functionality. To use 7 | this app, include it in your list of installed apps in ``settings.py``: 8 | 9 | .. code-block:: python 10 | 11 | # Django project settings.py 12 | 13 | ... 14 | 15 | INSTALLED_APPS = ( 16 | ... 17 | 'rest_framework_simplejwt.token_blacklist', 18 | ... 19 | ) 20 | 21 | Also, make sure to run ``python manage.py migrate`` to run the app's 22 | migrations. 23 | 24 | If the blacklist app is detected in ``INSTALLED_APPS``, Simple JWT will add any 25 | generated refresh or sliding tokens to a list of outstanding tokens. It will 26 | also check that any refresh or sliding token does not appear in a blacklist of 27 | tokens before it considers it as valid. 28 | 29 | The Simple JWT blacklist app implements its outstanding and blacklisted token 30 | lists using two models: ``OutstandingToken`` and ``BlacklistedToken``. Model 31 | admins are defined for both of these models. To add a token to the blacklist, 32 | find its corresponding ``OutstandingToken`` record in the admin and use the 33 | admin again to create a ``BlacklistedToken`` record that points to the 34 | ``OutstandingToken`` record. 35 | 36 | Alternatively, you can blacklist a token by creating a ``BlacklistMixin`` 37 | subclass instance and calling the instance's ``blacklist`` method: 38 | 39 | .. code-block:: python 40 | 41 | from rest_framework_simplejwt.tokens import RefreshToken 42 | 43 | token = RefreshToken(base64_encoded_token_string) 44 | token.blacklist() 45 | 46 | This will create unique outstanding token and blacklist records for the token's 47 | "jti" claim or whichever claim is specified by the ``JTI_CLAIM`` setting. 48 | 49 | In a ``urls.py`` file, you can also include a route for ``TokenBlacklistView``: 50 | 51 | .. code-block:: python 52 | 53 | from rest_framework_simplejwt.views import TokenBlacklistView 54 | 55 | urlpatterns = [ 56 | ... 57 | path('api/token/blacklist/', TokenBlacklistView.as_view(), name='token_blacklist'), 58 | ... 59 | ] 60 | 61 | It allows API users to blacklist tokens sending them to ``/api/token/blacklist/``, for example using curl: 62 | 63 | .. code-block:: bash 64 | 65 | curl \ 66 | -X POST \ 67 | -H "Content-Type: application/json" \ 68 | -d '{"refresh":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTY1MDI5NTEwOCwiaWF0IjoxNjUwMjA4NzA4LCJqdGkiOiJhYTY3ZDUxNzkwMGY0MTEyYTY5NTE0MTNmNWQ4NDk4NCIsInVzZXJfaWQiOjF9.tcj1_OcO1BRDfFyw4miHD7mqFdWKxmP7BJDRmxwCzrg"}' \ 69 | http://localhost:8000/api/token/blacklist/ 70 | 71 | The blacklist app also provides a management command, ``flushexpiredtokens``, 72 | which will delete any tokens from the outstanding list and blacklist that have 73 | expired. You should set up a cron job on your server or hosting platform which 74 | runs this command daily. 75 | -------------------------------------------------------------------------------- /docs/creating_tokens_manually.rst: -------------------------------------------------------------------------------- 1 | .. _creating_tokens_manually: 2 | 3 | Creating tokens manually 4 | ======================== 5 | 6 | Sometimes, you may wish to manually create a token for a user. This could be 7 | done as follows: 8 | 9 | .. warning:: 10 | The ``for_user`` method does not check if the user is active. If you need to verify the user's status, 11 | this check needs to be done before creating the tokens. 12 | 13 | .. code-block:: python 14 | 15 | from rest_framework_simplejwt.tokens import RefreshToken 16 | from rest_framework_simplejwt.exceptions import AuthenticationFailed 17 | 18 | def get_tokens_for_user(user): 19 | if not user.is_active: 20 | raise AuthenticationFailed("User is not active") 21 | 22 | refresh = RefreshToken.for_user(user) 23 | 24 | return { 25 | 'refresh': str(refresh), 26 | 'access': str(refresh.access_token), 27 | } 28 | 29 | The above function ``get_tokens_for_user`` will return the serialized 30 | representations of new refresh and access tokens for the given user. In 31 | general, a token for any subclass of ``rest_framework_simplejwt.tokens.Token`` 32 | can be created in this way. 33 | -------------------------------------------------------------------------------- /docs/customizing_token_claims.rst: -------------------------------------------------------------------------------- 1 | .. _customizing_token_claims: 2 | 3 | Customizing token claims 4 | ======================== 5 | 6 | If you wish to customize the claims contained in web tokens which are generated 7 | by the ``TokenObtainPairView`` and ``TokenObtainSlidingView`` views, create a 8 | subclass for the desired view as well as a subclass for its corresponding 9 | serializer. Here's an example of how to customize the claims in tokens 10 | generated by the ``TokenObtainPairView``: 11 | 12 | .. code-block:: python 13 | 14 | from rest_framework_simplejwt.serializers import TokenObtainPairSerializer 15 | from rest_framework_simplejwt.views import TokenObtainPairView 16 | 17 | class MyTokenObtainPairSerializer(TokenObtainPairSerializer): 18 | @classmethod 19 | def get_token(cls, user): 20 | token = super().get_token(user) 21 | 22 | # Add custom claims 23 | token['name'] = user.name 24 | # ... 25 | 26 | return token 27 | 28 | .. code-block:: python 29 | 30 | # Django project settings.py 31 | ... 32 | 33 | SIMPLE_JWT = { 34 | # It will work instead of the default serializer(TokenObtainPairSerializer). 35 | "TOKEN_OBTAIN_SERIALIZER": "my_app.serializers.MyTokenObtainPairSerializer", 36 | # ... 37 | } 38 | 39 | Note that the example above will cause the customized claims to be present in 40 | both refresh *and* access tokens which are generated by the view. This follows 41 | from the fact that the ``get_token`` method above produces the *refresh* token 42 | for the view, which is in turn used to generate the view's access token. 43 | 44 | As with the standard token views, you'll also need to include a url route to 45 | your subclassed view. 46 | -------------------------------------------------------------------------------- /docs/development_and_contributing.rst: -------------------------------------------------------------------------------- 1 | .. _development_and_contributing: 2 | 3 | Development and contributing 4 | ============================ 5 | 6 | To do development work for Simple JWT, make your own fork on Github, clone it 7 | locally, make and activate a virtualenv for it, then from within the project 8 | directory: 9 | 10 | .. code-block:: bash 11 | 12 | pip install --upgrade pip setuptools 13 | pip install -e .[dev] 14 | 15 | If you're running a Mac and/or with zsh, you need to escape the brackets: 16 | 17 | .. code-block:: bash 18 | 19 | pip install -e .\[dev\] 20 | 21 | To run the tests: 22 | 23 | .. code-block:: bash 24 | 25 | pytest 26 | 27 | To run the tests in all supported environments with tox, first `install pyenv 28 | `__. Next, install the relevant 29 | Python minor versions and create a ``.python-version`` file in the project 30 | directory: 31 | 32 | .. code-block:: bash 33 | 34 | pyenv install 3.9.x 35 | cat > .python-version <`__. 23 | 24 | ------------------------------------------------------------------------------- 25 | 26 | Simple JWT provides a JSON Web Token authentication backend for the Django REST 27 | Framework. It aims to cover the most common use cases of JWTs by offering a 28 | conservative set of default features. It also aims to be easily extensible in 29 | case a desired feature is not present. 30 | 31 | Acknowledgments 32 | --------------- 33 | 34 | This project borrows code from the `Django REST Framework 35 | `__ as well as concepts from 36 | the implementation of another JSON web token library for the Django REST 37 | Framework, `django-rest-framework-jwt 38 | `__. The licenses from 39 | both of those projects have been included in this repository in the "licenses" 40 | directory. 41 | 42 | Contents 43 | -------- 44 | 45 | .. toctree:: 46 | :maxdepth: 3 47 | 48 | getting_started 49 | settings 50 | customizing_token_claims 51 | creating_tokens_manually 52 | token_types 53 | blacklist_app 54 | stateless_user_authentication 55 | development_and_contributing 56 | drf_yasg_integration 57 | rest_framework_simplejwt 58 | 59 | 60 | Indices and tables 61 | ------------------ 62 | 63 | * :ref:`genindex` 64 | * :ref:`modindex` 65 | -------------------------------------------------------------------------------- /docs/rest_framework_simplejwt.rst: -------------------------------------------------------------------------------- 1 | rest\_framework\_simplejwt package 2 | ================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | rest\_framework\_simplejwt.authentication module 8 | ------------------------------------------------ 9 | 10 | .. automodule:: rest_framework_simplejwt.authentication 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | rest\_framework\_simplejwt.models module 16 | ---------------------------------------- 17 | 18 | .. automodule:: rest_framework_simplejwt.models 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | rest\_framework\_simplejwt.serializers module 24 | --------------------------------------------- 25 | 26 | .. automodule:: rest_framework_simplejwt.serializers 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | rest\_framework\_simplejwt.tokens module 32 | ---------------------------------------- 33 | 34 | .. automodule:: rest_framework_simplejwt.tokens 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | rest\_framework\_simplejwt.utils module 40 | --------------------------------------- 41 | 42 | .. automodule:: rest_framework_simplejwt.utils 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | rest\_framework\_simplejwt.views module 48 | --------------------------------------- 49 | 50 | .. automodule:: rest_framework_simplejwt.views 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | 55 | 56 | Module contents 57 | --------------- 58 | 59 | .. automodule:: rest_framework_simplejwt 60 | :members: 61 | :undoc-members: 62 | :show-inheritance: 63 | -------------------------------------------------------------------------------- /docs/stateless_user_authentication.rst: -------------------------------------------------------------------------------- 1 | .. _stateless_user_authentication: 2 | 3 | Stateless User Authentication 4 | ============================= 5 | 6 | JWTStatelessUserAuthentication backend 7 | -------------------------------------- 8 | 9 | The ``JWTStatelessUserAuthentication`` backend's ``authenticate`` method does not 10 | perform a database lookup to obtain a user instance. Instead, it returns a 11 | ``rest_framework_simplejwt.models.TokenUser`` instance which acts as a 12 | stateless user object backed only by a validated token instead of a record in a 13 | database. This can facilitate developing single sign-on functionality between 14 | separately hosted Django apps which all share the same token secret key. To 15 | use this feature, add the 16 | ``rest_framework_simplejwt.authentication.JWTStatelessUserAuthentication`` backend 17 | (instead of the default ``JWTAuthentication`` backend) to the Django REST 18 | Framework's ``DEFAULT_AUTHENTICATION_CLASSES`` config setting: 19 | 20 | .. code-block:: python 21 | 22 | REST_FRAMEWORK = { 23 | ... 24 | 'DEFAULT_AUTHENTICATION_CLASSES': ( 25 | ... 26 | 'rest_framework_simplejwt.authentication.JWTStatelessUserAuthentication', 27 | ) 28 | ... 29 | } 30 | 31 | v5.1.0 has renamed ``JWTTokenUserAuthentication`` to ``JWTStatelessUserAuthentication``, 32 | but both names are supported for backwards compatibility 33 | -------------------------------------------------------------------------------- /docs/token_types.rst: -------------------------------------------------------------------------------- 1 | .. _token_types: 2 | 3 | Token types 4 | =========== 5 | 6 | Simple JWT provides two different token types that can be used to prove 7 | authentication. In a token's payload, its type can be identified by the value 8 | of its token type claim, which is "token_type" by default. This may have a 9 | value of "access", "sliding", or "refresh" however refresh tokens are not 10 | considered valid for authentication at this time. The claim name used to store 11 | the type can be customized by changing the ``TOKEN_TYPE_CLAIM`` setting. 12 | 13 | By default, Simple JWT expects an "access" token to prove authentication. The 14 | allowed auth token types are determined by the value of the 15 | ``AUTH_TOKEN_CLASSES`` setting. This setting contains a list of dot paths to 16 | token classes. It includes the 17 | ``'rest_framework_simplejwt.tokens.AccessToken'`` dot path by default but may 18 | also include the ``'rest_framework_simplejwt.tokens.SlidingToken'`` dot path. 19 | Either or both of those dot paths may be present in the list of auth token 20 | classes. If they are both present, then both of those token types may be used 21 | to prove authentication. 22 | 23 | Sliding tokens 24 | -------------- 25 | 26 | Sliding tokens offer a more convenient experience to users of tokens with the 27 | trade-offs of being less secure and, in the case that the blacklist app is 28 | being used, less performant. A sliding token is one which contains both an 29 | expiration claim and a refresh expiration claim. As long as the timestamp in a 30 | sliding token's expiration claim has not passed, it can be used to prove 31 | authentication. Additionally, as long as the timestamp in its refresh 32 | expiration claim has not passed, it may also be submitted to a refresh view to 33 | get another copy of itself with a renewed expiration claim. 34 | 35 | If you want to use sliding tokens, change the ``AUTH_TOKEN_CLASSES`` setting to 36 | ``('rest_framework_simplejwt.tokens.SlidingToken',)``. (Alternatively, the 37 | ``AUTH_TOKEN_CLASSES`` setting may include dot paths to both the 38 | ``AccessToken`` and ``SlidingToken`` token classes in the 39 | ``rest_framework_simplejwt.tokens`` module if you want to allow both token 40 | types to be used for authentication.) 41 | 42 | Also, include urls for the sliding token specific ``TokenObtainSlidingView`` 43 | and ``TokenRefreshSlidingView`` views alongside or in place of urls for the 44 | access token specific ``TokenObtainPairView`` and ``TokenRefreshView`` views: 45 | 46 | .. code-block:: python 47 | 48 | from rest_framework_simplejwt.views import ( 49 | TokenObtainSlidingView, 50 | TokenRefreshSlidingView, 51 | ) 52 | 53 | urlpatterns = [ 54 | ... 55 | path('api/token/', TokenObtainSlidingView.as_view(), name='token_obtain'), 56 | path('api/token/refresh/', TokenRefreshSlidingView.as_view(), name='token_refresh'), 57 | ... 58 | ] 59 | 60 | Be aware that, if you are using the blacklist app, Simple JWT will validate all 61 | sliding tokens against the blacklist for each authenticated request. This will 62 | reduce the performance of authenticated API views. 63 | -------------------------------------------------------------------------------- /inlang.config.js: -------------------------------------------------------------------------------- 1 | // filename: inlang.config.js 2 | 3 | export async function defineConfig(env) { 4 | // importing a plugin 5 | const plugin = await env.$import( 6 | "https://cdn.jsdelivr.net/gh/jannesblobel/inlang-plugin-po@1/dist/index.js" 7 | ); 8 | 9 | // most plugins require additional config, read the plugins documentation 10 | // for the required config and correct usage. 11 | const pluginConfig = { 12 | pathPattern: 13 | "./rest_framework_simplejwt/locale/{language}/LC_MESSAGES/django.po", 14 | referenceResourcePath: null, 15 | }; 16 | 17 | return { 18 | referenceLanguage: "en", 19 | languages: [ 20 | "en", 21 | "cs", 22 | "de", 23 | "es", 24 | "es_AR", 25 | "es_CL", 26 | "fa_IR", 27 | "fr", 28 | "id_ID", 29 | "it_IT", 30 | "ko_KR", 31 | "nl_NL", 32 | "pl_PL", 33 | "pt_BR", 34 | "ro", 35 | "ru_RU", 36 | "sl", 37 | "sv", 38 | "tr", 39 | "uk_UA", 40 | "zh_Hans", 41 | ], 42 | readResources: (args) => 43 | plugin.readResources({ ...args, ...env, pluginConfig }), 44 | writeResources: (args) => 45 | plugin.writeResources({ ...args, ...env, pluginConfig }), 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /licenses/LICENSE-django-rest-framework-jwt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2017 Blimp LLC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /licenses/LICENSE-django-rest-framework.md: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | Copyright (c) 2011-2017, Tom Christie 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | Redistributions in binary form must reproduce the above copyright notice, this 12 | list of conditions and the following disclaimer in the documentation and/or 13 | other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | addopts= -v --showlocals --durations 10 3 | pythonpath= . 4 | xfail_strict=true 5 | 6 | [pytest-watch] 7 | runner= pytest --failed-first --maxfail=1 --no-success-flaky-report 8 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/__init__.py: -------------------------------------------------------------------------------- 1 | from importlib.metadata import PackageNotFoundError, version 2 | 3 | try: 4 | __version__ = version("djangorestframework_simplejwt") 5 | except PackageNotFoundError: 6 | # package is not installed 7 | __version__ = None 8 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/exceptions.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Optional, Union 2 | 3 | from django.utils.translation import gettext_lazy as _ 4 | from rest_framework import exceptions, status 5 | 6 | 7 | class TokenError(Exception): 8 | pass 9 | 10 | 11 | class ExpiredTokenError(TokenError): 12 | pass 13 | 14 | 15 | class TokenBackendError(Exception): 16 | pass 17 | 18 | 19 | class TokenBackendExpiredToken(TokenBackendError): 20 | pass 21 | 22 | 23 | class DetailDictMixin: 24 | default_detail: str 25 | default_code: str 26 | 27 | def __init__( 28 | self, 29 | detail: Union[dict[str, Any], str, None] = None, 30 | code: Optional[str] = None, 31 | ) -> None: 32 | """ 33 | Builds a detail dictionary for the error to give more information to API 34 | users. 35 | """ 36 | detail_dict = {"detail": self.default_detail, "code": self.default_code} 37 | 38 | if isinstance(detail, dict): 39 | detail_dict.update(detail) 40 | elif detail is not None: 41 | detail_dict["detail"] = detail 42 | 43 | if code is not None: 44 | detail_dict["code"] = code 45 | 46 | super().__init__(detail_dict) # type: ignore 47 | 48 | 49 | class AuthenticationFailed(DetailDictMixin, exceptions.AuthenticationFailed): 50 | pass 51 | 52 | 53 | class InvalidToken(AuthenticationFailed): 54 | status_code = status.HTTP_401_UNAUTHORIZED 55 | default_detail = _("Token is invalid or expired") 56 | default_code = "token_not_valid" 57 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/ar/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/ar/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/ar/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2019. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: Ahmed Jazzar \n" 9 | "Language: ar\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " 14 | "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" 15 | 16 | #: authentication.py:89 17 | msgid "Authorization header must contain two space-delimited values" 18 | msgstr "يجب أن يحتوي رأس التفويض على قيمتين مفصولتين بمسافات" 19 | 20 | #: authentication.py:115 21 | msgid "Given token not valid for any token type" 22 | msgstr "تأشيرة المرور غير صالحة لأي نوع من أنواع التأشيرات" 23 | 24 | #: authentication.py:127 authentication.py:162 25 | msgid "Token contained no recognizable user identification" 26 | msgstr "لا تحتوي تأشيرة المرور على هوية مستخدم يمكن التعرف عليها" 27 | 28 | #: authentication.py:132 29 | msgid "User not found" 30 | msgstr "لم يتم العثور على المستخدم" 31 | 32 | #: authentication.py:135 33 | msgid "User is inactive" 34 | msgstr "الحساب غير مفعل" 35 | 36 | #: authentication.py:142 37 | msgid "The user's password has been changed." 38 | msgstr "" 39 | 40 | #: backends.py:90 41 | msgid "Unrecognized algorithm type '{}'" 42 | msgstr "نوع الخوارزمية غير معروف '{}'" 43 | 44 | #: backends.py:96 45 | msgid "You must have cryptography installed to use {}." 46 | msgstr "يجب أن يكون لديك تشفير مثبت لاستخدام {}." 47 | 48 | #: backends.py:111 49 | msgid "" 50 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 51 | msgstr "" 52 | "نوع غير معروف '{}'. يجب أن تكون 'leeway' عددًا صحيحًا أو عددًا نسبيًا أو فرق وقت." 53 | 54 | #: backends.py:125 backends.py:177 tokens.py:69 55 | #, fuzzy 56 | #| msgid "Token is invalid or expired" 57 | msgid "Token is invalid" 58 | msgstr "تأشيرة المرور غير صالحة أو منتهية الصلاحية" 59 | 60 | #: backends.py:173 61 | msgid "Invalid algorithm specified" 62 | msgstr "تم تحديد خوارزمية غير صالحة" 63 | 64 | #: backends.py:175 tokens.py:67 65 | #, fuzzy 66 | #| msgid "Token is invalid or expired" 67 | msgid "Token is expired" 68 | msgstr "تأشيرة المرور غير صالحة أو منتهية الصلاحية" 69 | 70 | #: exceptions.py:55 71 | msgid "Token is invalid or expired" 72 | msgstr "تأشيرة المرور غير صالحة أو منتهية الصلاحية" 73 | 74 | #: serializers.py:35 75 | msgid "No active account found with the given credentials" 76 | msgstr "لم يتم العثور على حساب نشط للبيانات المقدمة" 77 | 78 | #: serializers.py:108 79 | #, fuzzy 80 | #| msgid "No active account found with the given credentials" 81 | msgid "No active account found for the given token." 82 | msgstr "لم يتم العثور على حساب نشط للبيانات المقدمة" 83 | 84 | #: serializers.py:178 tokens.py:299 85 | msgid "Token is blacklisted" 86 | msgstr "التأشيرة مدرجة في القائمة السوداء" 87 | 88 | #: settings.py:74 89 | msgid "" 90 | "The '{}' setting has been removed. Please refer to '{}' for available " 91 | "settings." 92 | msgstr "" 93 | "تمت إزالة الإعداد '{}'. يرجى الرجوع إلى '{}' للتعرف على الإعدادات المتاحة." 94 | 95 | #: token_blacklist/admin.py:79 96 | msgid "jti" 97 | msgstr "jti" 98 | 99 | #: token_blacklist/admin.py:85 100 | msgid "user" 101 | msgstr "المستخدم" 102 | 103 | #: token_blacklist/admin.py:91 104 | msgid "created at" 105 | msgstr "أنشئت في" 106 | 107 | #: token_blacklist/admin.py:97 108 | msgid "expires at" 109 | msgstr "تنتهي في" 110 | 111 | #: token_blacklist/apps.py:7 112 | msgid "Token Blacklist" 113 | msgstr "قائمة تأشيرات المرور السوداء" 114 | 115 | #: token_blacklist/models.py:19 116 | msgid "Outstanding Token" 117 | msgstr "" 118 | 119 | #: token_blacklist/models.py:20 120 | msgid "Outstanding Tokens" 121 | msgstr "" 122 | 123 | #: token_blacklist/models.py:32 124 | #, python-format 125 | msgid "Token for %(user)s (%(jti)s)" 126 | msgstr "" 127 | 128 | #: token_blacklist/models.py:45 129 | msgid "Blacklisted Token" 130 | msgstr "" 131 | 132 | #: token_blacklist/models.py:46 133 | msgid "Blacklisted Tokens" 134 | msgstr "" 135 | 136 | #: token_blacklist/models.py:57 137 | #, python-format 138 | msgid "Blacklisted token for %(user)s" 139 | msgstr "" 140 | 141 | #: tokens.py:53 142 | msgid "Cannot create token with no type or lifetime" 143 | msgstr "لا يمكن إنشاء تأشيرة مرور بدون نوع أو عمر" 144 | 145 | #: tokens.py:127 146 | msgid "Token has no id" 147 | msgstr "التأشيرة ليس لها معرف" 148 | 149 | #: tokens.py:139 150 | msgid "Token has no type" 151 | msgstr "التأشيرة ليس لها نوع" 152 | 153 | #: tokens.py:142 154 | msgid "Token has wrong type" 155 | msgstr "التأشيرة لها نوع خاطئ" 156 | 157 | #: tokens.py:201 158 | msgid "Token has no '{}' claim" 159 | msgstr "التأشيرة ليس لديها مطالبة '{}'" 160 | 161 | #: tokens.py:206 162 | msgid "Token '{}' claim has expired" 163 | msgstr "انتهى عمر المطالبة بالتأشيرة '{}'" 164 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/cs/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/cs/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/cs/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2019. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: Lukáš Rod \n" 9 | "Language: cs\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | 14 | #: authentication.py:89 15 | msgid "Authorization header must contain two space-delimited values" 16 | msgstr "Autorizační hlavička musí obsahovat dvě hodnoty oddělené mezerou" 17 | 18 | #: authentication.py:115 19 | msgid "Given token not valid for any token type" 20 | msgstr "Daný token není validní pro žádný typ tokenu" 21 | 22 | #: authentication.py:127 authentication.py:162 23 | msgid "Token contained no recognizable user identification" 24 | msgstr "Token neobsahoval žádnou rozpoznatelnou identifikaci uživatele" 25 | 26 | #: authentication.py:132 27 | msgid "User not found" 28 | msgstr "Uživatel nenalezen" 29 | 30 | #: authentication.py:135 31 | msgid "User is inactive" 32 | msgstr "Uživatel není aktivní" 33 | 34 | #: authentication.py:142 35 | msgid "The user's password has been changed." 36 | msgstr "" 37 | 38 | #: backends.py:90 39 | msgid "Unrecognized algorithm type '{}'" 40 | msgstr "Nerozpoznaný typ algoritmu '{}'" 41 | 42 | #: backends.py:96 43 | msgid "You must have cryptography installed to use {}." 44 | msgstr "" 45 | 46 | #: backends.py:111 47 | msgid "" 48 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 49 | msgstr "" 50 | 51 | #: backends.py:125 backends.py:177 tokens.py:69 52 | #, fuzzy 53 | #| msgid "Token is invalid or expired" 54 | msgid "Token is invalid" 55 | msgstr "Token není validní nebo vypršela jeho platnost" 56 | 57 | #: backends.py:173 58 | msgid "Invalid algorithm specified" 59 | msgstr "" 60 | 61 | #: backends.py:175 tokens.py:67 62 | #, fuzzy 63 | #| msgid "Token is invalid or expired" 64 | msgid "Token is expired" 65 | msgstr "Token není validní nebo vypršela jeho platnost" 66 | 67 | #: exceptions.py:55 68 | msgid "Token is invalid or expired" 69 | msgstr "Token není validní nebo vypršela jeho platnost" 70 | 71 | #: serializers.py:35 72 | msgid "No active account found with the given credentials" 73 | msgstr "Žádný aktivní účet s danými údaji nebyl nalezen" 74 | 75 | #: serializers.py:108 76 | #, fuzzy 77 | #| msgid "No active account found with the given credentials" 78 | msgid "No active account found for the given token." 79 | msgstr "Žádný aktivní účet s danými údaji nebyl nalezen" 80 | 81 | #: serializers.py:178 tokens.py:299 82 | msgid "Token is blacklisted" 83 | msgstr "Token je na černé listině" 84 | 85 | #: settings.py:74 86 | msgid "" 87 | "The '{}' setting has been removed. Please refer to '{}' for available " 88 | "settings." 89 | msgstr "Nastavení '{}' bylo odstraněno. Dostupná nastavení jsou v '{}'" 90 | 91 | #: token_blacklist/admin.py:79 92 | msgid "jti" 93 | msgstr "jti" 94 | 95 | #: token_blacklist/admin.py:85 96 | msgid "user" 97 | msgstr "uživatel" 98 | 99 | #: token_blacklist/admin.py:91 100 | msgid "created at" 101 | msgstr "vytvořený v" 102 | 103 | #: token_blacklist/admin.py:97 104 | msgid "expires at" 105 | msgstr "platí do" 106 | 107 | #: token_blacklist/apps.py:7 108 | msgid "Token Blacklist" 109 | msgstr "Token Blacklist" 110 | 111 | #: token_blacklist/models.py:19 112 | msgid "Outstanding Token" 113 | msgstr "" 114 | 115 | #: token_blacklist/models.py:20 116 | msgid "Outstanding Tokens" 117 | msgstr "" 118 | 119 | #: token_blacklist/models.py:32 120 | #, python-format 121 | msgid "Token for %(user)s (%(jti)s)" 122 | msgstr "" 123 | 124 | #: token_blacklist/models.py:45 125 | msgid "Blacklisted Token" 126 | msgstr "" 127 | 128 | #: token_blacklist/models.py:46 129 | msgid "Blacklisted Tokens" 130 | msgstr "" 131 | 132 | #: token_blacklist/models.py:57 133 | #, python-format 134 | msgid "Blacklisted token for %(user)s" 135 | msgstr "" 136 | 137 | #: tokens.py:53 138 | msgid "Cannot create token with no type or lifetime" 139 | msgstr "Nelze vytvořit token bez zadaného typu nebo životnosti" 140 | 141 | #: tokens.py:127 142 | msgid "Token has no id" 143 | msgstr "Token nemá žádný identifikátor" 144 | 145 | #: tokens.py:139 146 | msgid "Token has no type" 147 | msgstr "Token nemá žádný typ" 148 | 149 | #: tokens.py:142 150 | msgid "Token has wrong type" 151 | msgstr "Token má špatný typ" 152 | 153 | #: tokens.py:201 154 | msgid "Token has no '{}' claim" 155 | msgstr "Token nemá žádnou hodnotu '{}'" 156 | 157 | #: tokens.py:206 158 | msgid "Token '{}' claim has expired" 159 | msgstr "Hodnota tokenu '{}' vypršela" 160 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/de/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/de/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/de/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2020. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: rene \n" 9 | "Language: de_CH\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 14 | 15 | #: authentication.py:89 16 | msgid "Authorization header must contain two space-delimited values" 17 | msgstr "" 18 | "Der Authorizationheader muss zwei leerzeichen-getrennte Werte enthalten" 19 | 20 | #: authentication.py:115 21 | msgid "Given token not valid for any token type" 22 | msgstr "Der Token ist für keinen Tokentyp gültig" 23 | 24 | #: authentication.py:127 authentication.py:162 25 | msgid "Token contained no recognizable user identification" 26 | msgstr "Token enthält keine erkennbare Benutzeridentifikation" 27 | 28 | #: authentication.py:132 29 | msgid "User not found" 30 | msgstr "Benutzer nicht gefunden" 31 | 32 | #: authentication.py:135 33 | msgid "User is inactive" 34 | msgstr "Inaktiver Benutzer" 35 | 36 | #: authentication.py:142 37 | msgid "The user's password has been changed." 38 | msgstr "" 39 | 40 | #: backends.py:90 41 | msgid "Unrecognized algorithm type '{}'" 42 | msgstr "Unerkannter Algorithmustyp '{}'" 43 | 44 | #: backends.py:96 45 | msgid "You must have cryptography installed to use {}." 46 | msgstr "" 47 | 48 | #: backends.py:111 49 | msgid "" 50 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 51 | msgstr "" 52 | 53 | #: backends.py:125 backends.py:177 tokens.py:69 54 | #, fuzzy 55 | #| msgid "Token is invalid or expired" 56 | msgid "Token is invalid" 57 | msgstr "Ungültiger oder abgelaufener Token" 58 | 59 | #: backends.py:173 60 | msgid "Invalid algorithm specified" 61 | msgstr "" 62 | 63 | #: backends.py:175 tokens.py:67 64 | #, fuzzy 65 | #| msgid "Token is invalid or expired" 66 | msgid "Token is expired" 67 | msgstr "Ungültiger oder abgelaufener Token" 68 | 69 | #: exceptions.py:55 70 | msgid "Token is invalid or expired" 71 | msgstr "Ungültiger oder abgelaufener Token" 72 | 73 | #: serializers.py:35 74 | msgid "No active account found with the given credentials" 75 | msgstr "Kein aktiver Account mit diesen Zugangsdaten gefunden" 76 | 77 | #: serializers.py:108 78 | #, fuzzy 79 | #| msgid "No active account found with the given credentials" 80 | msgid "No active account found for the given token." 81 | msgstr "Kein aktiver Account mit diesen Zugangsdaten gefunden" 82 | 83 | #: serializers.py:178 tokens.py:299 84 | msgid "Token is blacklisted" 85 | msgstr "Token steht auf der Blacklist" 86 | 87 | #: settings.py:74 88 | msgid "" 89 | "The '{}' setting has been removed. Please refer to '{}' for available " 90 | "settings." 91 | msgstr "" 92 | "Die Einstellung '{}' wurde gelöscht. Bitte beachte '{}' für verfügbare " 93 | "Einstellungen." 94 | 95 | #: token_blacklist/admin.py:79 96 | msgid "jti" 97 | msgstr "jti" 98 | 99 | #: token_blacklist/admin.py:85 100 | msgid "user" 101 | msgstr "Benutzer" 102 | 103 | #: token_blacklist/admin.py:91 104 | msgid "created at" 105 | msgstr "erstellt am" 106 | 107 | #: token_blacklist/admin.py:97 108 | msgid "expires at" 109 | msgstr "läuft ab am" 110 | 111 | #: token_blacklist/apps.py:7 112 | msgid "Token Blacklist" 113 | msgstr "Token Blacklist" 114 | 115 | #: token_blacklist/models.py:19 116 | msgid "Outstanding Token" 117 | msgstr "" 118 | 119 | #: token_blacklist/models.py:20 120 | msgid "Outstanding Tokens" 121 | msgstr "" 122 | 123 | #: token_blacklist/models.py:32 124 | #, python-format 125 | msgid "Token for %(user)s (%(jti)s)" 126 | msgstr "" 127 | 128 | #: token_blacklist/models.py:45 129 | msgid "Blacklisted Token" 130 | msgstr "" 131 | 132 | #: token_blacklist/models.py:46 133 | msgid "Blacklisted Tokens" 134 | msgstr "" 135 | 136 | #: token_blacklist/models.py:57 137 | #, python-format 138 | msgid "Blacklisted token for %(user)s" 139 | msgstr "" 140 | 141 | #: tokens.py:53 142 | msgid "Cannot create token with no type or lifetime" 143 | msgstr "Ein Token ohne Typ oder Lebensdauer kann nicht erstellt werden" 144 | 145 | #: tokens.py:127 146 | msgid "Token has no id" 147 | msgstr "Token hat keine Id" 148 | 149 | #: tokens.py:139 150 | msgid "Token has no type" 151 | msgstr "Token hat keinen Typ" 152 | 153 | #: tokens.py:142 154 | msgid "Token has wrong type" 155 | msgstr "Token hat den falschen Typ" 156 | 157 | #: tokens.py:201 158 | msgid "Token has no '{}' claim" 159 | msgstr "Token hat kein '{}' Recht" 160 | 161 | #: tokens.py:206 162 | msgid "Token '{}' claim has expired" 163 | msgstr "Das Tokenrecht '{}' ist abgelaufen" 164 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/es/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/es/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/es/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2020. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: zeack \n" 9 | "Language: es\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 | 15 | #: authentication.py:89 16 | msgid "Authorization header must contain two space-delimited values" 17 | msgstr "" 18 | "El encabezado 'Authorization' debe contener valores delimitados por espacios" 19 | 20 | #: authentication.py:115 21 | msgid "Given token not valid for any token type" 22 | msgstr "El token dado no es valido para ningun tipo de token" 23 | 24 | #: authentication.py:127 authentication.py:162 25 | msgid "Token contained no recognizable user identification" 26 | msgstr "El token no contenía identificación de usuario reconocible" 27 | 28 | #: authentication.py:132 29 | msgid "User not found" 30 | msgstr "Usuario no encontrado" 31 | 32 | #: authentication.py:135 33 | msgid "User is inactive" 34 | msgstr "El usuario está inactivo" 35 | 36 | #: authentication.py:142 37 | msgid "The user's password has been changed." 38 | msgstr "" 39 | 40 | #: backends.py:90 41 | msgid "Unrecognized algorithm type '{}'" 42 | msgstr "Tipo de algoritmo no reconocido '{}'" 43 | 44 | #: backends.py:96 45 | msgid "You must have cryptography installed to use {}." 46 | msgstr "Debe tener criptografía instalada para usar {}." 47 | 48 | #: backends.py:111 49 | msgid "" 50 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 51 | msgstr "" 52 | 53 | #: backends.py:125 backends.py:177 tokens.py:69 54 | #, fuzzy 55 | #| msgid "Token is invalid or expired" 56 | msgid "Token is invalid" 57 | msgstr "El token es inválido o ha expirado" 58 | 59 | #: backends.py:173 60 | msgid "Invalid algorithm specified" 61 | msgstr "Algoritmo especificado no válido" 62 | 63 | #: backends.py:175 tokens.py:67 64 | #, fuzzy 65 | #| msgid "Token is invalid or expired" 66 | msgid "Token is expired" 67 | msgstr "El token es inválido o ha expirado" 68 | 69 | #: exceptions.py:55 70 | msgid "Token is invalid or expired" 71 | msgstr "El token es inválido o ha expirado" 72 | 73 | #: serializers.py:35 74 | msgid "No active account found with the given credentials" 75 | msgstr "La combinación de credenciales no tiene una cuenta activa" 76 | 77 | #: serializers.py:108 78 | #, fuzzy 79 | #| msgid "No active account found with the given credentials" 80 | msgid "No active account found for the given token." 81 | msgstr "La combinación de credenciales no tiene una cuenta activa" 82 | 83 | #: serializers.py:178 tokens.py:299 84 | msgid "Token is blacklisted" 85 | msgstr "El token está en lista negra" 86 | 87 | #: settings.py:74 88 | msgid "" 89 | "The '{}' setting has been removed. Please refer to '{}' for available " 90 | "settings." 91 | msgstr "" 92 | "La configuración '{}' fue removida. Por favor, refiérase a '{}' para " 93 | "consultar las disponibles." 94 | 95 | #: token_blacklist/admin.py:79 96 | msgid "jti" 97 | msgstr "jti" 98 | 99 | #: token_blacklist/admin.py:85 100 | msgid "user" 101 | msgstr "usuario" 102 | 103 | #: token_blacklist/admin.py:91 104 | msgid "created at" 105 | msgstr "creado en" 106 | 107 | #: token_blacklist/admin.py:97 108 | msgid "expires at" 109 | msgstr "expira en" 110 | 111 | #: token_blacklist/apps.py:7 112 | msgid "Token Blacklist" 113 | msgstr "Lista negra de Tokens" 114 | 115 | #: token_blacklist/models.py:19 116 | msgid "Outstanding Token" 117 | msgstr "" 118 | 119 | #: token_blacklist/models.py:20 120 | msgid "Outstanding Tokens" 121 | msgstr "" 122 | 123 | #: token_blacklist/models.py:32 124 | #, python-format 125 | msgid "Token for %(user)s (%(jti)s)" 126 | msgstr "" 127 | 128 | #: token_blacklist/models.py:45 129 | msgid "Blacklisted Token" 130 | msgstr "" 131 | 132 | #: token_blacklist/models.py:46 133 | msgid "Blacklisted Tokens" 134 | msgstr "" 135 | 136 | #: token_blacklist/models.py:57 137 | #, python-format 138 | msgid "Blacklisted token for %(user)s" 139 | msgstr "" 140 | 141 | #: tokens.py:53 142 | msgid "Cannot create token with no type or lifetime" 143 | msgstr "No se puede crear un token sin tipo o de tan larga vida" 144 | 145 | #: tokens.py:127 146 | msgid "Token has no id" 147 | msgstr "El token no tiene id" 148 | 149 | #: tokens.py:139 150 | msgid "Token has no type" 151 | msgstr "El token no tiene tipo" 152 | 153 | #: tokens.py:142 154 | msgid "Token has wrong type" 155 | msgstr "El token tiene un tipo incorrecto" 156 | 157 | #: tokens.py:201 158 | msgid "Token has no '{}' claim" 159 | msgstr "El token no tiene el privilegio '{}'" 160 | 161 | #: tokens.py:206 162 | msgid "Token '{}' claim has expired" 163 | msgstr "El privilegio '{}' del token ha expirado" 164 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/es_AR/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/es_AR/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/es_CL/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/es_CL/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/es_CL/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2019. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: Alfonso Pola \n" 9 | "Language: es_CL\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 14 | 15 | #: authentication.py:89 16 | msgid "Authorization header must contain two space-delimited values" 17 | msgstr "" 18 | "El header de autorización debe contener dos valores delimitados por espacio" 19 | 20 | #: authentication.py:115 21 | msgid "Given token not valid for any token type" 22 | msgstr "El token provisto no es válido para ningún tipo de token" 23 | 24 | #: authentication.py:127 authentication.py:162 25 | msgid "Token contained no recognizable user identification" 26 | msgstr "El token no contiene identificación de usuario reconocible" 27 | 28 | #: authentication.py:132 29 | msgid "User not found" 30 | msgstr "Usuario no encontrado" 31 | 32 | #: authentication.py:135 33 | msgid "User is inactive" 34 | msgstr "El usuario está inactivo" 35 | 36 | #: authentication.py:142 37 | msgid "The user's password has been changed." 38 | msgstr "" 39 | 40 | #: backends.py:90 41 | msgid "Unrecognized algorithm type '{}'" 42 | msgstr "Tipo de algoritmo no reconocido '{}'" 43 | 44 | #: backends.py:96 45 | msgid "You must have cryptography installed to use {}." 46 | msgstr "" 47 | 48 | #: backends.py:111 49 | msgid "" 50 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 51 | msgstr "" 52 | 53 | #: backends.py:125 backends.py:177 tokens.py:69 54 | #, fuzzy 55 | #| msgid "Token is invalid or expired" 56 | msgid "Token is invalid" 57 | msgstr "Token inválido o expirado" 58 | 59 | #: backends.py:173 60 | msgid "Invalid algorithm specified" 61 | msgstr "" 62 | 63 | #: backends.py:175 tokens.py:67 64 | #, fuzzy 65 | #| msgid "Token is invalid or expired" 66 | msgid "Token is expired" 67 | msgstr "Token inválido o expirado" 68 | 69 | #: exceptions.py:55 70 | msgid "Token is invalid or expired" 71 | msgstr "Token inválido o expirado" 72 | 73 | #: serializers.py:35 74 | msgid "No active account found with the given credentials" 75 | msgstr "" 76 | "No se encontró una cuenta de usuario activa para las credenciales provistas" 77 | 78 | #: serializers.py:108 79 | #, fuzzy 80 | #| msgid "No active account found with the given credentials" 81 | msgid "No active account found for the given token." 82 | msgstr "" 83 | "No se encontró una cuenta de usuario activa para las credenciales provistas" 84 | 85 | #: serializers.py:178 tokens.py:299 86 | msgid "Token is blacklisted" 87 | msgstr "Token está en la blacklist" 88 | 89 | #: settings.py:74 90 | msgid "" 91 | "The '{}' setting has been removed. Please refer to '{}' for available " 92 | "settings." 93 | msgstr "" 94 | "La configuración '{}' fue removida. Por favor, refiérase a '{}' para " 95 | "configuraciones disponibles." 96 | 97 | #: token_blacklist/admin.py:79 98 | msgid "jti" 99 | msgstr "jti" 100 | 101 | #: token_blacklist/admin.py:85 102 | msgid "user" 103 | msgstr "Usuario" 104 | 105 | #: token_blacklist/admin.py:91 106 | msgid "created at" 107 | msgstr "creado en" 108 | 109 | #: token_blacklist/admin.py:97 110 | msgid "expires at" 111 | msgstr "expira en" 112 | 113 | #: token_blacklist/apps.py:7 114 | msgid "Token Blacklist" 115 | msgstr "Token Blacklist" 116 | 117 | #: token_blacklist/models.py:19 118 | msgid "Outstanding Token" 119 | msgstr "" 120 | 121 | #: token_blacklist/models.py:20 122 | msgid "Outstanding Tokens" 123 | msgstr "" 124 | 125 | #: token_blacklist/models.py:32 126 | #, python-format 127 | msgid "Token for %(user)s (%(jti)s)" 128 | msgstr "" 129 | 130 | #: token_blacklist/models.py:45 131 | msgid "Blacklisted Token" 132 | msgstr "" 133 | 134 | #: token_blacklist/models.py:46 135 | msgid "Blacklisted Tokens" 136 | msgstr "" 137 | 138 | #: token_blacklist/models.py:57 139 | #, python-format 140 | msgid "Blacklisted token for %(user)s" 141 | msgstr "" 142 | 143 | #: tokens.py:53 144 | msgid "Cannot create token with no type or lifetime" 145 | msgstr "No es posible crear un token sin tipo o tiempo de vida" 146 | 147 | #: tokens.py:127 148 | msgid "Token has no id" 149 | msgstr "Token no tiene id" 150 | 151 | #: tokens.py:139 152 | msgid "Token has no type" 153 | msgstr "Token no tiene tipo" 154 | 155 | #: tokens.py:142 156 | msgid "Token has wrong type" 157 | msgstr "Token tiene tipo erróneo" 158 | 159 | #: tokens.py:201 160 | msgid "Token has no '{}' claim" 161 | msgstr "Token no tiene privilegio '{}'" 162 | 163 | #: tokens.py:206 164 | msgid "Token '{}' claim has expired" 165 | msgstr "El provilegio '{}' del token está expirado" 166 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/fa/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/fa/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/fa/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , 2023. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: PACKAGE VERSION\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2025-03-27 15:19+0330\n" 11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12 | "Last-Translator: Mahdi Rahimi \n" 13 | "Language: fa\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 18 | 19 | #: authentication.py:89 20 | msgid "Authorization header must contain two space-delimited values" 21 | msgstr "هدر اعتبارسنجی باید شامل دو مقدار جدا شده با فاصله باشد" 22 | 23 | #: authentication.py:115 24 | msgid "Given token not valid for any token type" 25 | msgstr "توکن داده شده برای هیچ نوع توکنی معتبر نمی‌باشد" 26 | 27 | #: authentication.py:128 authentication.py:166 28 | msgid "Token contained no recognizable user identification" 29 | msgstr "توکن شامل هیچ شناسه قابل تشخیصی از کاربر نیست" 30 | 31 | #: authentication.py:135 32 | msgid "User not found" 33 | msgstr "کاربر یافت نشد" 34 | 35 | #: authentication.py:139 36 | msgid "User is inactive" 37 | msgstr "کاربر غیرفعال است" 38 | 39 | #: authentication.py:146 40 | msgid "The user's password has been changed." 41 | msgstr "رمز عبور کاربر تغییر کرده است" 42 | 43 | #: backends.py:90 44 | msgid "Unrecognized algorithm type '{}'" 45 | msgstr "نوع الگوریتم ناشناخته '{}'" 46 | 47 | #: backends.py:96 48 | msgid "You must have cryptography installed to use {}." 49 | msgstr "برای استفاده از {} باید رمزنگاری را نصب کرده باشید." 50 | 51 | #: backends.py:111 52 | msgid "" 53 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 54 | msgstr "نوع ناشناخته '{}'، 'leeway' باید از نوع int، float یا timedelta باشد." 55 | 56 | #: backends.py:125 backends.py:177 tokens.py:69 57 | msgid "Token is invalid" 58 | msgstr "توکن نامعتبر است" 59 | 60 | #: backends.py:173 61 | msgid "Invalid algorithm specified" 62 | msgstr "الگوریتم نامعتبر مشخص شده است" 63 | 64 | #: backends.py:175 tokens.py:67 65 | msgid "Token is expired" 66 | msgstr "توکن منقضی شده است" 67 | 68 | #: exceptions.py:55 69 | msgid "Token is invalid or expired" 70 | msgstr "توکن نامعتبر است یا منقضی شده است" 71 | 72 | #: serializers.py:35 73 | msgid "No active account found with the given credentials" 74 | msgstr "هیچ اکانت فعالی برای اطلاعات داده شده یافت نشد" 75 | 76 | #: serializers.py:108 77 | msgid "No active account found for the given token." 78 | msgstr "هیچ اکانت فعالی برای این توکن یافت نشد" 79 | 80 | #: serializers.py:178 tokens.py:281 81 | msgid "Token is blacklisted" 82 | msgstr "توکن در لیست سیاه قرار گرفته است" 83 | 84 | #: settings.py:74 85 | msgid "" 86 | "The '{}' setting has been removed. Please refer to '{}' for available " 87 | "settings." 88 | msgstr "تنظیمات '{}' حذف شده است. لطفاً به '{}' برای تنظیمات موجود مراجعه کنید." 89 | 90 | #: token_blacklist/admin.py:79 91 | msgid "jti" 92 | msgstr "شناسه توکن (jti)" 93 | 94 | #: token_blacklist/admin.py:85 95 | msgid "user" 96 | msgstr "کاربر" 97 | 98 | #: token_blacklist/admin.py:91 99 | msgid "created at" 100 | msgstr "زمان ایجاد" 101 | 102 | #: token_blacklist/admin.py:97 103 | msgid "expires at" 104 | msgstr "زمان انقضا" 105 | 106 | #: token_blacklist/apps.py:7 107 | msgid "Token Blacklist" 108 | msgstr "لیست سیاه توکن" 109 | 110 | #: token_blacklist/models.py:19 111 | msgid "Outstanding Token" 112 | msgstr "توکن برجسته" 113 | 114 | #: token_blacklist/models.py:20 115 | msgid "Outstanding Tokens" 116 | msgstr "توکن‌های برجسته" 117 | 118 | #: token_blacklist/models.py:32 119 | #, python-format 120 | msgid "Token for %(user)s (%(jti)s)" 121 | msgstr "توکن برای %(user)s (%(jti)s)" 122 | 123 | #: token_blacklist/models.py:45 124 | msgid "Blacklisted Token" 125 | msgstr "توکن لیست سیاه شده" 126 | 127 | #: token_blacklist/models.py:46 128 | msgid "Blacklisted Tokens" 129 | msgstr "توکن‌های لیست سیاه شده" 130 | 131 | #: token_blacklist/models.py:57 132 | #, python-format 133 | msgid "Blacklisted token for %(user)s" 134 | msgstr "توکن لیست سیاه شده برای %(user)s" 135 | 136 | #: tokens.py:53 137 | msgid "Cannot create token with no type or lifetime" 138 | msgstr "توکن بدون نوع یا طول عمر قابل ایجاد نیست" 139 | 140 | #: tokens.py:127 141 | msgid "Token has no id" 142 | msgstr "توکن id ندارد" 143 | 144 | #: tokens.py:139 145 | msgid "Token has no type" 146 | msgstr "توکن نوعی ندارد" 147 | 148 | #: tokens.py:142 149 | msgid "Token has wrong type" 150 | msgstr "توکن دارای نوع نادرستی است" 151 | 152 | #: tokens.py:201 153 | msgid "Token has no '{}' claim" 154 | msgstr "توکن دارای '{}' claim نمی‌باشد" 155 | 156 | #: tokens.py:206 157 | msgid "Token '{}' claim has expired" 158 | msgstr "'{}' claim توکن منقضی شده" 159 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/fa_IR/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/fa_IR/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/fa_IR/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2020. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-03-27 15:19+0330\n" 8 | "Last-Translator: Mahdi Rahimi \n" 9 | "Language: fa_IR\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | 14 | #: authentication.py:89 15 | msgid "Authorization header must contain two space-delimited values" 16 | msgstr "هدر اعتبارسنجی باید شامل دو مقدار جدا شده با فاصله باشد" 17 | 18 | #: authentication.py:115 19 | msgid "Given token not valid for any token type" 20 | msgstr "توکن داده شده برای هیچ نوع توکنی معتبر نمی‌باشد" 21 | 22 | #: authentication.py:128 authentication.py:166 23 | msgid "Token contained no recognizable user identification" 24 | msgstr "توکن شامل هیچ شناسه قابل تشخیصی از کاربر نیست" 25 | 26 | #: authentication.py:135 27 | msgid "User not found" 28 | msgstr "کاربر یافت نشد" 29 | 30 | #: authentication.py:139 31 | msgid "User is inactive" 32 | msgstr "کاربر غیرفعال است" 33 | 34 | #: authentication.py:146 35 | msgid "The user's password has been changed." 36 | msgstr "رمز عبور کاربر تغییر کرده است" 37 | 38 | #: backends.py:90 39 | msgid "Unrecognized algorithm type '{}'" 40 | msgstr "نوع الگوریتم ناشناخته '{}'" 41 | 42 | #: backends.py:96 43 | msgid "You must have cryptography installed to use {}." 44 | msgstr "برای استفاده از {} باید رمزنگاری را نصب کرده باشید." 45 | 46 | #: backends.py:111 47 | msgid "" 48 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 49 | msgstr "نوع ناشناخته '{}'، 'leeway' باید از نوع int، float یا timedelta باشد." 50 | 51 | #: backends.py:125 backends.py:177 tokens.py:69 52 | msgid "Token is invalid" 53 | msgstr "توکن نامعتبر است" 54 | 55 | #: backends.py:173 56 | msgid "Invalid algorithm specified" 57 | msgstr "الگوریتم نامعتبر مشخص شده است" 58 | 59 | #: backends.py:175 tokens.py:67 60 | msgid "Token is expired" 61 | msgstr "توکن منقضی شده است" 62 | 63 | #: exceptions.py:55 64 | msgid "Token is invalid or expired" 65 | msgstr "توکن نامعتبر است یا منقضی شده است" 66 | 67 | #: serializers.py:35 68 | msgid "No active account found with the given credentials" 69 | msgstr "هیچ اکانت فعالی برای اطلاعات داده شده یافت نشد" 70 | 71 | #: serializers.py:108 72 | msgid "No active account found for the given token." 73 | msgstr "هیچ اکانت فعالی برای توکن داده شده یافت نشد" 74 | 75 | #: serializers.py:178 tokens.py:281 76 | msgid "Token is blacklisted" 77 | msgstr "توکن به لیست سیاه رفته است" 78 | 79 | #: settings.py:74 80 | msgid "" 81 | "The '{}' setting has been removed. Please refer to '{}' for available " 82 | "settings." 83 | msgstr "تنظیمات '{}' حذف شده است. لطفا به '{}' برای تنظیمات موجود مراجعه کنید." 84 | 85 | #: token_blacklist/admin.py:79 86 | msgid "jti" 87 | msgstr "شناسه توکن (jti)" 88 | 89 | #: token_blacklist/admin.py:85 90 | msgid "user" 91 | msgstr "کاربر" 92 | 93 | #: token_blacklist/admin.py:91 94 | msgid "created at" 95 | msgstr "زمان ایجاد" 96 | 97 | #: token_blacklist/admin.py:97 98 | msgid "expires at" 99 | msgstr "زمان انقضا" 100 | 101 | #: token_blacklist/apps.py:7 102 | msgid "Token Blacklist" 103 | msgstr "لیست سیاه توکن" 104 | 105 | #: token_blacklist/models.py:19 106 | msgid "Outstanding Token" 107 | msgstr "توکن برجسته" 108 | 109 | #: token_blacklist/models.py:20 110 | msgid "Outstanding Tokens" 111 | msgstr "توکن‌های برجسته" 112 | 113 | #: token_blacklist/models.py:32 114 | #, python-format 115 | msgid "Token for %(user)s (%(jti)s)" 116 | msgstr "توکن برای %(user)s (%(jti)s)" 117 | 118 | #: token_blacklist/models.py:45 119 | msgid "Blacklisted Token" 120 | msgstr "توکن در لیست سیاه" 121 | 122 | #: token_blacklist/models.py:46 123 | msgid "Blacklisted Tokens" 124 | msgstr "توکن‌های لیست سیاه" 125 | 126 | #: token_blacklist/models.py:57 127 | #, python-format 128 | msgid "Blacklisted token for %(user)s" 129 | msgstr "توکن لیست سیاه برای %(user)s" 130 | 131 | #: tokens.py:53 132 | msgid "Cannot create token with no type or lifetime" 133 | msgstr "توکن بدون هیچ نوع و طول عمر قابل ساخت نیست" 134 | 135 | #: tokens.py:127 136 | msgid "Token has no id" 137 | msgstr "توکن id ندارد" 138 | 139 | #: tokens.py:139 140 | msgid "Token has no type" 141 | msgstr "توکن نوع ندارد" 142 | 143 | #: tokens.py:142 144 | msgid "Token has wrong type" 145 | msgstr "توکن نوع اشتباهی دارد" 146 | 147 | #: tokens.py:201 148 | msgid "Token has no '{}' claim" 149 | msgstr "توکن دارای '{}' claim نمی‌باشد" 150 | 151 | #: tokens.py:206 152 | msgid "Token '{}' claim has expired" 153 | msgstr "'{}' claim توکن منقضی شده" 154 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/fr/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/fr/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/fr/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2020. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: Stéphane Malta e Sousa \n" 9 | "Language: fr\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | 14 | #: authentication.py:89 15 | msgid "Authorization header must contain two space-delimited values" 16 | msgstr "" 17 | "L'en-tête 'Authorization' doit contenir deux valeurs séparées par des espaces" 18 | 19 | #: authentication.py:115 20 | msgid "Given token not valid for any token type" 21 | msgstr "Le type de jeton fourni n'est pas valide" 22 | 23 | #: authentication.py:127 authentication.py:162 24 | msgid "Token contained no recognizable user identification" 25 | msgstr "" 26 | "Le jeton ne contient aucune information permettant d'identifier l'utilisateur" 27 | 28 | #: authentication.py:132 29 | msgid "User not found" 30 | msgstr "L'utilisateur n'a pas été trouvé" 31 | 32 | #: authentication.py:135 33 | msgid "User is inactive" 34 | msgstr "L'utilisateur est désactivé" 35 | 36 | #: authentication.py:142 37 | msgid "The user's password has been changed." 38 | msgstr "" 39 | 40 | #: backends.py:90 41 | msgid "Unrecognized algorithm type '{}'" 42 | msgstr "Type d'algorithme non reconnu '{}'" 43 | 44 | #: backends.py:96 45 | msgid "You must have cryptography installed to use {}." 46 | msgstr "Vous devez installer cryptography afin d'utiliser {}." 47 | 48 | #: backends.py:111 49 | msgid "" 50 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 51 | msgstr "" 52 | 53 | #: backends.py:125 backends.py:177 tokens.py:69 54 | #, fuzzy 55 | #| msgid "Token is invalid or expired" 56 | msgid "Token is invalid" 57 | msgstr "Le jeton est invalide ou expiré" 58 | 59 | #: backends.py:173 60 | msgid "Invalid algorithm specified" 61 | msgstr "L'algorithme spécifié est invalide" 62 | 63 | #: backends.py:175 tokens.py:67 64 | #, fuzzy 65 | #| msgid "Token is invalid or expired" 66 | msgid "Token is expired" 67 | msgstr "Le jeton est invalide ou expiré" 68 | 69 | #: exceptions.py:55 70 | msgid "Token is invalid or expired" 71 | msgstr "Le jeton est invalide ou expiré" 72 | 73 | #: serializers.py:35 74 | msgid "No active account found with the given credentials" 75 | msgstr "Aucun compte actif n'a été trouvé avec les identifiants fournis" 76 | 77 | #: serializers.py:108 78 | #, fuzzy 79 | #| msgid "No active account found with the given credentials" 80 | msgid "No active account found for the given token." 81 | msgstr "Aucun compte actif n'a été trouvé avec les identifiants fournis" 82 | 83 | #: serializers.py:178 tokens.py:299 84 | msgid "Token is blacklisted" 85 | msgstr "Le jeton a été banni" 86 | 87 | #: settings.py:74 88 | msgid "" 89 | "The '{}' setting has been removed. Please refer to '{}' for available " 90 | "settings." 91 | msgstr "" 92 | "Le paramètre '{}' a été supprimé. Voir '{}' pour la liste des paramètres " 93 | "disponibles." 94 | 95 | #: token_blacklist/admin.py:79 96 | msgid "jti" 97 | msgstr "jti" 98 | 99 | #: token_blacklist/admin.py:85 100 | msgid "user" 101 | msgstr "Utilisateur" 102 | 103 | #: token_blacklist/admin.py:91 104 | msgid "created at" 105 | msgstr "Créé le" 106 | 107 | #: token_blacklist/admin.py:97 108 | msgid "expires at" 109 | msgstr "Expire le" 110 | 111 | #: token_blacklist/apps.py:7 112 | msgid "Token Blacklist" 113 | msgstr "Liste des jetons bannis" 114 | 115 | #: token_blacklist/models.py:19 116 | msgid "Outstanding Token" 117 | msgstr "" 118 | 119 | #: token_blacklist/models.py:20 120 | msgid "Outstanding Tokens" 121 | msgstr "" 122 | 123 | #: token_blacklist/models.py:32 124 | #, python-format 125 | msgid "Token for %(user)s (%(jti)s)" 126 | msgstr "" 127 | 128 | #: token_blacklist/models.py:45 129 | msgid "Blacklisted Token" 130 | msgstr "" 131 | 132 | #: token_blacklist/models.py:46 133 | msgid "Blacklisted Tokens" 134 | msgstr "" 135 | 136 | #: token_blacklist/models.py:57 137 | #, python-format 138 | msgid "Blacklisted token for %(user)s" 139 | msgstr "" 140 | 141 | #: tokens.py:53 142 | msgid "Cannot create token with no type or lifetime" 143 | msgstr "Ne peut pas créer de jeton sans type ni durée de vie" 144 | 145 | #: tokens.py:127 146 | msgid "Token has no id" 147 | msgstr "Le jeton n'a pas d'id" 148 | 149 | #: tokens.py:139 150 | msgid "Token has no type" 151 | msgstr "Le jeton n'a pas de type" 152 | 153 | #: tokens.py:142 154 | msgid "Token has wrong type" 155 | msgstr "Le jeton a un type erroné" 156 | 157 | #: tokens.py:201 158 | msgid "Token has no '{}' claim" 159 | msgstr "Le jeton n'a pas le privilège '{}'" 160 | 161 | #: tokens.py:206 162 | msgid "Token '{}' claim has expired" 163 | msgstr "Le privilège '{}' du jeton a expiré" 164 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/he_IL/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/he_IL/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/he_IL/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2020. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "PO-Revision-Date: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "Language: he\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n==2 ? 1 : n>10 && n%10==0 ? " 16 | "2 : 3);\n" 17 | "X-Generator: Poedit 3.2.2\n" 18 | 19 | #: authentication.py:89 20 | msgid "Authorization header must contain two space-delimited values" 21 | msgstr "Authorization Header חייבת להכיל שני ערכים מופרדים ברווח" 22 | 23 | #: authentication.py:115 24 | msgid "Given token not valid for any token type" 25 | msgstr "המזהה הנתון אינו תקף עבור אף סיווג" 26 | 27 | #: authentication.py:127 authentication.py:162 28 | msgid "Token contained no recognizable user identification" 29 | msgstr "המזהה לא הכיל זיהוי משתמש שניתן לזהות" 30 | 31 | #: authentication.py:132 32 | msgid "User not found" 33 | msgstr "משתמש לא נמצא" 34 | 35 | #: authentication.py:135 36 | msgid "User is inactive" 37 | msgstr "המשתמש אינו פעיל" 38 | 39 | #: authentication.py:142 40 | msgid "The user's password has been changed." 41 | msgstr "" 42 | 43 | #: backends.py:90 44 | msgid "Unrecognized algorithm type '{}'" 45 | msgstr "סוג אלגוריתם לא מזוהה '{}'" 46 | 47 | #: backends.py:96 48 | msgid "You must have cryptography installed to use {}." 49 | msgstr "עליך להתקין קריפטוגרפיה כדי להשתמש ב-{}." 50 | 51 | #: backends.py:111 52 | msgid "" 53 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 54 | msgstr "סוג לא מזוהה '{}', 'leeway' חייב להיות מסוג int, float או timedelta." 55 | 56 | #: backends.py:125 backends.py:177 tokens.py:69 57 | #, fuzzy 58 | #| msgid "Token is invalid or expired" 59 | msgid "Token is invalid" 60 | msgstr "המזהה אינו חוקי או שפג תוקפו" 61 | 62 | #: backends.py:173 63 | msgid "Invalid algorithm specified" 64 | msgstr "צוין אלגוריתם לא חוקי" 65 | 66 | #: backends.py:175 tokens.py:67 67 | #, fuzzy 68 | #| msgid "Token is invalid or expired" 69 | msgid "Token is expired" 70 | msgstr "המזהה אינו חוקי או שפג תוקפו" 71 | 72 | #: exceptions.py:55 73 | msgid "Token is invalid or expired" 74 | msgstr "המזהה אינו חוקי או שפג תוקפו" 75 | 76 | #: serializers.py:35 77 | msgid "No active account found with the given credentials" 78 | msgstr "לא נמצא חשבון עם פרטי זיהוי אלו" 79 | 80 | #: serializers.py:108 81 | #, fuzzy 82 | #| msgid "No active account found with the given credentials" 83 | msgid "No active account found for the given token." 84 | msgstr "לא נמצא חשבון עם פרטי זיהוי אלו" 85 | 86 | #: serializers.py:178 tokens.py:299 87 | msgid "Token is blacklisted" 88 | msgstr "המזהה ברשימה השחורה." 89 | 90 | #: settings.py:74 91 | msgid "" 92 | "The '{}' setting has been removed. Please refer to '{}' for available " 93 | "settings." 94 | msgstr "ההגדרה '{}' הוסרה. בבקשה קראו כאן: '{}' בשביל לראות הגדרות אפשרויות" 95 | 96 | #: token_blacklist/admin.py:79 97 | msgid "jti" 98 | msgstr "jti" 99 | 100 | #: token_blacklist/admin.py:85 101 | msgid "user" 102 | msgstr "משתמש" 103 | 104 | #: token_blacklist/admin.py:91 105 | msgid "created at" 106 | msgstr "נוצר בשעה" 107 | 108 | #: token_blacklist/admin.py:97 109 | msgid "expires at" 110 | msgstr "פג תוקף בשעה" 111 | 112 | #: token_blacklist/apps.py:7 113 | msgid "Token Blacklist" 114 | msgstr "רשימה שחורה של מזהים" 115 | 116 | #: token_blacklist/models.py:19 117 | msgid "Outstanding Token" 118 | msgstr "" 119 | 120 | #: token_blacklist/models.py:20 121 | msgid "Outstanding Tokens" 122 | msgstr "" 123 | 124 | #: token_blacklist/models.py:32 125 | #, python-format 126 | msgid "Token for %(user)s (%(jti)s)" 127 | msgstr "" 128 | 129 | #: token_blacklist/models.py:45 130 | msgid "Blacklisted Token" 131 | msgstr "" 132 | 133 | #: token_blacklist/models.py:46 134 | msgid "Blacklisted Tokens" 135 | msgstr "" 136 | 137 | #: token_blacklist/models.py:57 138 | #, python-format 139 | msgid "Blacklisted token for %(user)s" 140 | msgstr "" 141 | 142 | #: tokens.py:53 143 | msgid "Cannot create token with no type or lifetime" 144 | msgstr "לא ניתן ליצור מזהה ללא סוג או אורך חיים" 145 | 146 | #: tokens.py:127 147 | msgid "Token has no id" 148 | msgstr "למזהה אין מספר זיהוי" 149 | 150 | #: tokens.py:139 151 | msgid "Token has no type" 152 | msgstr "למזהה אין סוג" 153 | 154 | #: tokens.py:142 155 | msgid "Token has wrong type" 156 | msgstr "למזהה יש סוג לא נכון" 157 | 158 | #: tokens.py:201 159 | msgid "Token has no '{}' claim" 160 | msgstr "למזהה אין '{}'" 161 | 162 | #: tokens.py:206 163 | msgid "Token '{}' claim has expired" 164 | msgstr "מזהה '{}' פג תוקף" 165 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/id_ID/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/id_ID/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/id_ID/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # , 2020 5 | # Kira , 2023 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: djangorestframework_simplejwt\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 11 | "PO-Revision-Date: 2023-03-09 08:14+0000\n" 12 | "Last-Translator: Kira \n" 13 | "Language: id_ID\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 18 | 19 | #: authentication.py:89 20 | msgid "Authorization header must contain two space-delimited values" 21 | msgstr "Header otorisasi harus berisi dua nilai yang dipisahkan spasi" 22 | 23 | #: authentication.py:115 24 | msgid "Given token not valid for any token type" 25 | msgstr "Token yang diberikan tidak valid untuk semua jenis token" 26 | 27 | #: authentication.py:127 authentication.py:162 28 | msgid "Token contained no recognizable user identification" 29 | msgstr "Token tidak mengandung identifikasi pengguna yang dapat dikenali" 30 | 31 | #: authentication.py:132 32 | msgid "User not found" 33 | msgstr "Pengguna tidak ditemukan" 34 | 35 | #: authentication.py:135 36 | msgid "User is inactive" 37 | msgstr "Pengguna tidak aktif" 38 | 39 | #: authentication.py:142 40 | msgid "The user's password has been changed." 41 | msgstr "" 42 | 43 | #: backends.py:90 44 | msgid "Unrecognized algorithm type '{}'" 45 | msgstr "Jenis algoritma tidak dikenal '{}'" 46 | 47 | #: backends.py:96 48 | msgid "You must have cryptography installed to use {}." 49 | msgstr "Anda harus memasang cryptography untuk menggunakan {}." 50 | 51 | #: backends.py:111 52 | msgid "" 53 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 54 | msgstr "" 55 | "Tipe '{}' tidak dikenali, 'leeway' harus bertipe int, float, atau timedelta." 56 | 57 | #: backends.py:125 backends.py:177 tokens.py:69 58 | #, fuzzy 59 | #| msgid "Token is invalid or expired" 60 | msgid "Token is invalid" 61 | msgstr "Token tidak valid atau kedaluwarsa" 62 | 63 | #: backends.py:173 64 | msgid "Invalid algorithm specified" 65 | msgstr "Algoritma yang ditentukan tidak valid" 66 | 67 | #: backends.py:175 tokens.py:67 68 | #, fuzzy 69 | #| msgid "Token is invalid or expired" 70 | msgid "Token is expired" 71 | msgstr "Token tidak valid atau kedaluwarsa" 72 | 73 | #: exceptions.py:55 74 | msgid "Token is invalid or expired" 75 | msgstr "Token tidak valid atau kedaluwarsa" 76 | 77 | #: serializers.py:35 78 | msgid "No active account found with the given credentials" 79 | msgstr "Tidak ada akun aktif yang ditemukan dengan kredensial yang diberikan" 80 | 81 | #: serializers.py:108 82 | #, fuzzy 83 | #| msgid "No active account found with the given credentials" 84 | msgid "No active account found for the given token." 85 | msgstr "Tidak ada akun aktif yang ditemukan dengan kredensial yang diberikan" 86 | 87 | #: serializers.py:178 tokens.py:299 88 | msgid "Token is blacklisted" 89 | msgstr "Token masuk daftar hitam" 90 | 91 | #: settings.py:74 92 | msgid "" 93 | "The '{}' setting has been removed. Please refer to '{}' for available " 94 | "settings." 95 | msgstr "" 96 | "Setelan '{}' telah dihapus. Silakan merujuk ke '{}' untuk pengaturan yang " 97 | "tersedia." 98 | 99 | #: token_blacklist/admin.py:79 100 | msgid "jti" 101 | msgstr "jti" 102 | 103 | #: token_blacklist/admin.py:85 104 | msgid "user" 105 | msgstr "pengguna" 106 | 107 | #: token_blacklist/admin.py:91 108 | msgid "created at" 109 | msgstr "created at" 110 | 111 | #: token_blacklist/admin.py:97 112 | msgid "expires at" 113 | msgstr "kedaluwarsa pada" 114 | 115 | #: token_blacklist/apps.py:7 116 | msgid "Token Blacklist" 117 | msgstr "Daftar Hitam Token" 118 | 119 | #: token_blacklist/models.py:19 120 | msgid "Outstanding Token" 121 | msgstr "" 122 | 123 | #: token_blacklist/models.py:20 124 | msgid "Outstanding Tokens" 125 | msgstr "" 126 | 127 | #: token_blacklist/models.py:32 128 | #, python-format 129 | msgid "Token for %(user)s (%(jti)s)" 130 | msgstr "" 131 | 132 | #: token_blacklist/models.py:45 133 | msgid "Blacklisted Token" 134 | msgstr "" 135 | 136 | #: token_blacklist/models.py:46 137 | msgid "Blacklisted Tokens" 138 | msgstr "" 139 | 140 | #: token_blacklist/models.py:57 141 | #, python-format 142 | msgid "Blacklisted token for %(user)s" 143 | msgstr "" 144 | 145 | #: tokens.py:53 146 | msgid "Cannot create token with no type or lifetime" 147 | msgstr "Tidak dapat membuat token tanpa tipe atau masa pakai" 148 | 149 | #: tokens.py:127 150 | msgid "Token has no id" 151 | msgstr "Token tidak memiliki id" 152 | 153 | #: tokens.py:139 154 | msgid "Token has no type" 155 | msgstr "Token tidak memiliki tipe" 156 | 157 | #: tokens.py:142 158 | msgid "Token has wrong type" 159 | msgstr "Jenis token salah" 160 | 161 | #: tokens.py:201 162 | msgid "Token has no '{}' claim" 163 | msgstr "Token tidak memiliki klaim '{}'" 164 | 165 | #: tokens.py:206 166 | msgid "Token '{}' claim has expired" 167 | msgstr "Klaim token '{}' telah kedaluwarsa" 168 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/it_IT/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/it_IT/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/it_IT/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR <95adriano@gmail.com>, 2020. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "PO-Revision-Date: \n" 9 | "Last-Translator: Adriano Di Dio <95adriano@gmail.com>\n" 10 | "Language-Team: \n" 11 | "Language: it_IT\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "X-Generator: Poedit 2.0.6\n" 16 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 17 | 18 | #: authentication.py:89 19 | msgid "Authorization header must contain two space-delimited values" 20 | msgstr "" 21 | "L'header di autorizzazione deve contenere due valori delimitati da uno spazio" 22 | 23 | #: authentication.py:115 24 | msgid "Given token not valid for any token type" 25 | msgstr "Il token dato non è valido per qualsiasi tipo di token" 26 | 27 | #: authentication.py:127 authentication.py:162 28 | msgid "Token contained no recognizable user identification" 29 | msgstr "Il token non conteneva nessuna informazione riconoscibile dell'utente" 30 | 31 | #: authentication.py:132 32 | msgid "User not found" 33 | msgstr "Utente non trovato" 34 | 35 | #: authentication.py:135 36 | msgid "User is inactive" 37 | msgstr "Utente non attivo" 38 | 39 | #: authentication.py:142 40 | msgid "The user's password has been changed." 41 | msgstr "" 42 | 43 | #: backends.py:90 44 | msgid "Unrecognized algorithm type '{}'" 45 | msgstr "Algoritmo di tipo '{}' non riconosciuto" 46 | 47 | #: backends.py:96 48 | msgid "You must have cryptography installed to use {}." 49 | msgstr "Devi avere installato cryptography per usare '{}'." 50 | 51 | #: backends.py:111 52 | msgid "" 53 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 54 | msgstr "" 55 | 56 | #: backends.py:125 backends.py:177 tokens.py:69 57 | #, fuzzy 58 | #| msgid "Token is invalid or expired" 59 | msgid "Token is invalid" 60 | msgstr "Il token non è valido o è scaduto" 61 | 62 | #: backends.py:173 63 | msgid "Invalid algorithm specified" 64 | msgstr "L'algoritmo specificato non è valido" 65 | 66 | #: backends.py:175 tokens.py:67 67 | #, fuzzy 68 | #| msgid "Token is invalid or expired" 69 | msgid "Token is expired" 70 | msgstr "Il token non è valido o è scaduto" 71 | 72 | #: exceptions.py:55 73 | msgid "Token is invalid or expired" 74 | msgstr "Il token non è valido o è scaduto" 75 | 76 | #: serializers.py:35 77 | msgid "No active account found with the given credentials" 78 | msgstr "Nessun account attivo trovato con queste credenziali" 79 | 80 | #: serializers.py:108 81 | #, fuzzy 82 | #| msgid "No active account found with the given credentials" 83 | msgid "No active account found for the given token." 84 | msgstr "Nessun account attivo trovato con queste credenziali" 85 | 86 | #: serializers.py:178 tokens.py:299 87 | msgid "Token is blacklisted" 88 | msgstr "Il token è stato inserito nella blacklist" 89 | 90 | #: settings.py:74 91 | msgid "" 92 | "The '{}' setting has been removed. Please refer to '{}' for available " 93 | "settings." 94 | msgstr "" 95 | "L'impostazione '{}' è stata rimossa. Per favore utilizza '{}' per " 96 | "visualizzare le impostazioni valide." 97 | 98 | #: token_blacklist/admin.py:79 99 | msgid "jti" 100 | msgstr "jti" 101 | 102 | #: token_blacklist/admin.py:85 103 | msgid "user" 104 | msgstr "utente" 105 | 106 | #: token_blacklist/admin.py:91 107 | msgid "created at" 108 | msgstr "creato il" 109 | 110 | #: token_blacklist/admin.py:97 111 | msgid "expires at" 112 | msgstr "scade il" 113 | 114 | #: token_blacklist/apps.py:7 115 | msgid "Token Blacklist" 116 | msgstr "Blacklist dei token" 117 | 118 | #: token_blacklist/models.py:19 119 | msgid "Outstanding Token" 120 | msgstr "" 121 | 122 | #: token_blacklist/models.py:20 123 | msgid "Outstanding Tokens" 124 | msgstr "" 125 | 126 | #: token_blacklist/models.py:32 127 | #, python-format 128 | msgid "Token for %(user)s (%(jti)s)" 129 | msgstr "" 130 | 131 | #: token_blacklist/models.py:45 132 | msgid "Blacklisted Token" 133 | msgstr "" 134 | 135 | #: token_blacklist/models.py:46 136 | msgid "Blacklisted Tokens" 137 | msgstr "" 138 | 139 | #: token_blacklist/models.py:57 140 | #, python-format 141 | msgid "Blacklisted token for %(user)s" 142 | msgstr "" 143 | 144 | #: tokens.py:53 145 | msgid "Cannot create token with no type or lifetime" 146 | msgstr "Impossibile creare un token senza tipo o durata" 147 | 148 | #: tokens.py:127 149 | msgid "Token has no id" 150 | msgstr "Il token non ha un id" 151 | 152 | #: tokens.py:139 153 | msgid "Token has no type" 154 | msgstr "Il token non ha un tipo" 155 | 156 | #: tokens.py:142 157 | msgid "Token has wrong type" 158 | msgstr "Il token ha un tipo sbagliato" 159 | 160 | #: tokens.py:201 161 | msgid "Token has no '{}' claim" 162 | msgstr "Il token non contiene il parametro '{}'" 163 | 164 | #: tokens.py:206 165 | msgid "Token '{}' claim has expired" 166 | msgstr "Il parametro '{}' del token è scaduto" 167 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/ko_KR/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/ko_KR/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/ko_KR/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR 양영광 , 2022. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: 정재균 \n" 9 | "Language: ko_KR\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=1; plural=0;\n" 14 | 15 | #: authentication.py:89 16 | msgid "Authorization header must contain two space-delimited values" 17 | msgstr "인증 헤더에는 공백으로 구분 된 두 개의 값이 포함되어야 합니다" 18 | 19 | #: authentication.py:115 20 | msgid "Given token not valid for any token type" 21 | msgstr "이 토큰은 모든 타입의 토큰에 대해 유효하지 않습니다" 22 | 23 | #: authentication.py:127 authentication.py:162 24 | msgid "Token contained no recognizable user identification" 25 | msgstr "토큰에 사용자 식별자가 포함되어 있지 않습니다" 26 | 27 | #: authentication.py:132 28 | msgid "User not found" 29 | msgstr "찾을 수 없는 사용자입니다" 30 | 31 | #: authentication.py:135 32 | msgid "User is inactive" 33 | msgstr "비활성화된 사용자입니다" 34 | 35 | #: authentication.py:142 36 | msgid "The user's password has been changed." 37 | msgstr "사용자의 비밀번호가 바뀌었습니다." 38 | 39 | #: backends.py:90 40 | msgid "Unrecognized algorithm type '{}'" 41 | msgstr "'{}' 는 알 수 없는 알고리즘 유형입니다" 42 | 43 | #: backends.py:96 44 | msgid "You must have cryptography installed to use {}." 45 | msgstr "{}를 사용하려면 암호화가 설치되어 있어야 합니다." 46 | 47 | #: backends.py:111 48 | msgid "" 49 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 50 | msgstr "" 51 | "알 수 없는 타입 '{}', 'leeway' 값은 반드시 int, float 또는 timedelta 타입이어" 52 | "야 합니다." 53 | 54 | #: backends.py:125 backends.py:177 tokens.py:69 55 | #, fuzzy 56 | #| msgid "Token is invalid or expired" 57 | msgid "Token is invalid" 58 | msgstr "유효하지 않거나 만료된 토큰입니다" 59 | 60 | #: backends.py:173 61 | msgid "Invalid algorithm specified" 62 | msgstr "잘못된 알고리즘이 지정되었습니다" 63 | 64 | #: backends.py:175 tokens.py:67 65 | #, fuzzy 66 | #| msgid "Token is invalid or expired" 67 | msgid "Token is expired" 68 | msgstr "유효하지 않거나 만료된 토큰입니다" 69 | 70 | #: exceptions.py:55 71 | msgid "Token is invalid or expired" 72 | msgstr "유효하지 않거나 만료된 토큰입니다" 73 | 74 | #: serializers.py:35 75 | msgid "No active account found with the given credentials" 76 | msgstr "지정된 자격 증명에 해당하는 활성화된 사용자를 찾을 수 없습니다" 77 | 78 | #: serializers.py:108 79 | #, fuzzy 80 | #| msgid "No active account found with the given credentials" 81 | msgid "No active account found for the given token." 82 | msgstr "지정된 자격 증명에 해당하는 활성화된 사용자를 찾을 수 없습니다" 83 | 84 | #: serializers.py:178 tokens.py:299 85 | msgid "Token is blacklisted" 86 | msgstr "블랙리스트에 추가된 토큰입니다" 87 | 88 | #: settings.py:74 89 | msgid "" 90 | "The '{}' setting has been removed. Please refer to '{}' for available " 91 | "settings." 92 | msgstr "'{}' 설정이 제거되었습니다. 사용 가능한 설정은 '{}'을 참조하십시오." 93 | 94 | #: token_blacklist/admin.py:79 95 | msgid "jti" 96 | msgstr "jti" 97 | 98 | #: token_blacklist/admin.py:85 99 | msgid "user" 100 | msgstr "사용자" 101 | 102 | #: token_blacklist/admin.py:91 103 | msgid "created at" 104 | msgstr "생성 시간" 105 | 106 | #: token_blacklist/admin.py:97 107 | msgid "expires at" 108 | msgstr "만료 시간" 109 | 110 | #: token_blacklist/apps.py:7 111 | msgid "Token Blacklist" 112 | msgstr "토큰 블랙리스트" 113 | 114 | #: token_blacklist/models.py:19 115 | msgid "Outstanding Token" 116 | msgstr "" 117 | 118 | #: token_blacklist/models.py:20 119 | msgid "Outstanding Tokens" 120 | msgstr "" 121 | 122 | #: token_blacklist/models.py:32 123 | #, python-format 124 | msgid "Token for %(user)s (%(jti)s)" 125 | msgstr "" 126 | 127 | #: token_blacklist/models.py:45 128 | msgid "Blacklisted Token" 129 | msgstr "" 130 | 131 | #: token_blacklist/models.py:46 132 | msgid "Blacklisted Tokens" 133 | msgstr "" 134 | 135 | #: token_blacklist/models.py:57 136 | #, python-format 137 | msgid "Blacklisted token for %(user)s" 138 | msgstr "" 139 | 140 | #: tokens.py:53 141 | msgid "Cannot create token with no type or lifetime" 142 | msgstr "타입 또는 수명이 없는 토큰을 생성할 수 없습니다" 143 | 144 | #: tokens.py:127 145 | msgid "Token has no id" 146 | msgstr "토큰에 식별자가 주어지지 않았습니다" 147 | 148 | #: tokens.py:139 149 | msgid "Token has no type" 150 | msgstr "토큰 타입이 주어지지 않았습니다" 151 | 152 | #: tokens.py:142 153 | msgid "Token has wrong type" 154 | msgstr "잘못된 토큰 타입입니다" 155 | 156 | #: tokens.py:201 157 | msgid "Token has no '{}' claim" 158 | msgstr "토큰에 '{}' 클레임이 없습니다" 159 | 160 | #: tokens.py:206 161 | msgid "Token '{}' claim has expired" 162 | msgstr "토큰 '{}' 클레임이 만료되었습니다" 163 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/nl_NL/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/nl_NL/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/nl_NL/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2020. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: rene \n" 9 | "Language: nl_NL\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | 14 | #: authentication.py:89 15 | msgid "Authorization header must contain two space-delimited values" 16 | msgstr "" 17 | "Authorisatie header moet twee waarden bevatten, gescheiden door een spatie" 18 | 19 | #: authentication.py:115 20 | msgid "Given token not valid for any token type" 21 | msgstr "Het token is voor geen enkel token-type geldig" 22 | 23 | #: authentication.py:127 authentication.py:162 24 | msgid "Token contained no recognizable user identification" 25 | msgstr "Token bevat geen herkenbare gebruikersidentificatie" 26 | 27 | #: authentication.py:132 28 | msgid "User not found" 29 | msgstr "Gebruiker niet gevonden" 30 | 31 | #: authentication.py:135 32 | msgid "User is inactive" 33 | msgstr "Gebruiker is inactief" 34 | 35 | #: authentication.py:142 36 | msgid "The user's password has been changed." 37 | msgstr "" 38 | 39 | #: backends.py:90 40 | msgid "Unrecognized algorithm type '{}'" 41 | msgstr "Niet herkend algoritme type '{}" 42 | 43 | #: backends.py:96 44 | msgid "You must have cryptography installed to use {}." 45 | msgstr "" 46 | 47 | #: backends.py:111 48 | msgid "" 49 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 50 | msgstr "" 51 | 52 | #: backends.py:125 backends.py:177 tokens.py:69 53 | #, fuzzy 54 | #| msgid "Token is invalid or expired" 55 | msgid "Token is invalid" 56 | msgstr "Token is niet geldig of verlopen" 57 | 58 | #: backends.py:173 59 | msgid "Invalid algorithm specified" 60 | msgstr "" 61 | 62 | #: backends.py:175 tokens.py:67 63 | #, fuzzy 64 | #| msgid "Token is invalid or expired" 65 | msgid "Token is expired" 66 | msgstr "Token is niet geldig of verlopen" 67 | 68 | #: exceptions.py:55 69 | msgid "Token is invalid or expired" 70 | msgstr "Token is niet geldig of verlopen" 71 | 72 | #: serializers.py:35 73 | msgid "No active account found with the given credentials" 74 | msgstr "Geen actief account gevonden voor deze gegevens" 75 | 76 | #: serializers.py:108 77 | #, fuzzy 78 | #| msgid "No active account found with the given credentials" 79 | msgid "No active account found for the given token." 80 | msgstr "Geen actief account gevonden voor deze gegevens" 81 | 82 | #: serializers.py:178 tokens.py:299 83 | msgid "Token is blacklisted" 84 | msgstr "Token is ge-blacklist" 85 | 86 | #: settings.py:74 87 | msgid "" 88 | "The '{}' setting has been removed. Please refer to '{}' for available " 89 | "settings." 90 | msgstr "" 91 | "De '{}' instelling bestaat niet meer. Zie '{}' for beschikbareinstellingen." 92 | 93 | #: token_blacklist/admin.py:79 94 | msgid "jti" 95 | msgstr "jti" 96 | 97 | #: token_blacklist/admin.py:85 98 | msgid "user" 99 | msgstr "gebruiker" 100 | 101 | #: token_blacklist/admin.py:91 102 | msgid "created at" 103 | msgstr "aangemaakt op" 104 | 105 | #: token_blacklist/admin.py:97 106 | msgid "expires at" 107 | msgstr "verloopt op" 108 | 109 | #: token_blacklist/apps.py:7 110 | msgid "Token Blacklist" 111 | msgstr "Token Blacklist" 112 | 113 | #: token_blacklist/models.py:19 114 | msgid "Outstanding Token" 115 | msgstr "" 116 | 117 | #: token_blacklist/models.py:20 118 | msgid "Outstanding Tokens" 119 | msgstr "" 120 | 121 | #: token_blacklist/models.py:32 122 | #, python-format 123 | msgid "Token for %(user)s (%(jti)s)" 124 | msgstr "" 125 | 126 | #: token_blacklist/models.py:45 127 | msgid "Blacklisted Token" 128 | msgstr "" 129 | 130 | #: token_blacklist/models.py:46 131 | msgid "Blacklisted Tokens" 132 | msgstr "" 133 | 134 | #: token_blacklist/models.py:57 135 | #, python-format 136 | msgid "Blacklisted token for %(user)s" 137 | msgstr "" 138 | 139 | #: tokens.py:53 140 | msgid "Cannot create token with no type or lifetime" 141 | msgstr "Kan geen token maken zonder type of levensduur" 142 | 143 | #: tokens.py:127 144 | msgid "Token has no id" 145 | msgstr "Token heeft geen id" 146 | 147 | #: tokens.py:139 148 | msgid "Token has no type" 149 | msgstr "Token heeft geen type" 150 | 151 | #: tokens.py:142 152 | msgid "Token has wrong type" 153 | msgstr "Token heeft het verkeerde type" 154 | 155 | #: tokens.py:201 156 | msgid "Token has no '{}' claim" 157 | msgstr "Token heeft geen '{}' recht" 158 | 159 | #: tokens.py:206 160 | msgid "Token '{}' claim has expired" 161 | msgstr "Token '{}' recht is verlopen" 162 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/pl_PL/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/pl_PL/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/pl_PL/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2019. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: Mateusz Slisz \n" 9 | "Language: pl_PL\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | 14 | #: authentication.py:89 15 | msgid "Authorization header must contain two space-delimited values" 16 | msgstr "Nagłówek autoryzacji musi zawierać dwie wartości rodzielone spacjami" 17 | 18 | #: authentication.py:115 19 | msgid "Given token not valid for any token type" 20 | msgstr "Podany token jest błędny dla każdego typu tokena" 21 | 22 | #: authentication.py:127 authentication.py:162 23 | msgid "Token contained no recognizable user identification" 24 | msgstr "Token nie zawierał rozpoznawalnej identyfikacji użytkownika" 25 | 26 | #: authentication.py:132 27 | msgid "User not found" 28 | msgstr "Użytkownik nie znaleziony" 29 | 30 | #: authentication.py:135 31 | msgid "User is inactive" 32 | msgstr "Użytkownik jest nieaktywny" 33 | 34 | #: authentication.py:142 35 | msgid "The user's password has been changed." 36 | msgstr "" 37 | 38 | #: backends.py:90 39 | msgid "Unrecognized algorithm type '{}'" 40 | msgstr "Nierozpoznany typ algorytmu '{}'" 41 | 42 | #: backends.py:96 43 | msgid "You must have cryptography installed to use {}." 44 | msgstr "" 45 | 46 | #: backends.py:111 47 | msgid "" 48 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 49 | msgstr "" 50 | 51 | #: backends.py:125 backends.py:177 tokens.py:69 52 | #, fuzzy 53 | #| msgid "Token is invalid or expired" 54 | msgid "Token is invalid" 55 | msgstr "Token jest niepoprawny lub wygasł" 56 | 57 | #: backends.py:173 58 | msgid "Invalid algorithm specified" 59 | msgstr "" 60 | 61 | #: backends.py:175 tokens.py:67 62 | #, fuzzy 63 | #| msgid "Token is invalid or expired" 64 | msgid "Token is expired" 65 | msgstr "Token jest niepoprawny lub wygasł" 66 | 67 | #: exceptions.py:55 68 | msgid "Token is invalid or expired" 69 | msgstr "Token jest niepoprawny lub wygasł" 70 | 71 | #: serializers.py:35 72 | msgid "No active account found with the given credentials" 73 | msgstr "Nie znaleziono aktywnego konta dla podanych danych uwierzytelniających" 74 | 75 | #: serializers.py:108 76 | #, fuzzy 77 | #| msgid "No active account found with the given credentials" 78 | msgid "No active account found for the given token." 79 | msgstr "Nie znaleziono aktywnego konta dla podanych danych uwierzytelniających" 80 | 81 | #: serializers.py:178 tokens.py:299 82 | msgid "Token is blacklisted" 83 | msgstr "Token znajduję się na czarnej liście" 84 | 85 | #: settings.py:74 86 | msgid "" 87 | "The '{}' setting has been removed. Please refer to '{}' for available " 88 | "settings." 89 | msgstr "" 90 | "Ustawienie '{}' zostało usunięte. Dostępne ustawienia znajdują sie w '{}'" 91 | 92 | #: token_blacklist/admin.py:79 93 | msgid "jti" 94 | msgstr "jti" 95 | 96 | #: token_blacklist/admin.py:85 97 | msgid "user" 98 | msgstr "użytkownik" 99 | 100 | #: token_blacklist/admin.py:91 101 | msgid "created at" 102 | msgstr "stworzony w" 103 | 104 | #: token_blacklist/admin.py:97 105 | msgid "expires at" 106 | msgstr "wygasa o" 107 | 108 | #: token_blacklist/apps.py:7 109 | msgid "Token Blacklist" 110 | msgstr "Token Blacklist" 111 | 112 | #: token_blacklist/models.py:19 113 | msgid "Outstanding Token" 114 | msgstr "" 115 | 116 | #: token_blacklist/models.py:20 117 | msgid "Outstanding Tokens" 118 | msgstr "" 119 | 120 | #: token_blacklist/models.py:32 121 | #, python-format 122 | msgid "Token for %(user)s (%(jti)s)" 123 | msgstr "" 124 | 125 | #: token_blacklist/models.py:45 126 | msgid "Blacklisted Token" 127 | msgstr "" 128 | 129 | #: token_blacklist/models.py:46 130 | msgid "Blacklisted Tokens" 131 | msgstr "" 132 | 133 | #: token_blacklist/models.py:57 134 | #, python-format 135 | msgid "Blacklisted token for %(user)s" 136 | msgstr "" 137 | 138 | #: tokens.py:53 139 | msgid "Cannot create token with no type or lifetime" 140 | msgstr "Nie można utworzyć tokena bez podanego typu lub żywotności" 141 | 142 | #: tokens.py:127 143 | msgid "Token has no id" 144 | msgstr "Token nie posiada numeru identyfikacyjnego" 145 | 146 | #: tokens.py:139 147 | msgid "Token has no type" 148 | msgstr "Token nie posiada typu" 149 | 150 | #: tokens.py:142 151 | msgid "Token has wrong type" 152 | msgstr "Token posiada zły typ" 153 | 154 | #: tokens.py:201 155 | msgid "Token has no '{}' claim" 156 | msgstr "Token nie posiada upoważnienia '{}'" 157 | 158 | #: tokens.py:206 159 | msgid "Token '{}' claim has expired" 160 | msgstr "Upoważnienie tokena '{}' wygasło" 161 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/pt_BR/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/pt_BR/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/pt_BR/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2019. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:08-0300\n" 8 | "Last-Translator: Cloves Oliveira \n" 9 | "Language: pt_BR\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 14 | 15 | #: authentication.py:89 16 | msgid "Authorization header must contain two space-delimited values" 17 | msgstr "" 18 | "Cabeçalho de autorização deve conter dois valores delimitados por espaço" 19 | 20 | #: authentication.py:115 21 | msgid "Given token not valid for any token type" 22 | msgstr "O token informado não é válido para qualquer tipo de token" 23 | 24 | #: authentication.py:127 authentication.py:162 25 | msgid "Token contained no recognizable user identification" 26 | msgstr "O token não continha nenhuma identificação reconhecível do usuário" 27 | 28 | #: authentication.py:132 29 | msgid "User not found" 30 | msgstr "Usuário não encontrado" 31 | 32 | #: authentication.py:135 33 | msgid "User is inactive" 34 | msgstr "Usuário está inativo" 35 | 36 | #: authentication.py:142 37 | msgid "The user's password has been changed." 38 | msgstr "A senha do usuário foi alterada." 39 | 40 | #: backends.py:90 41 | msgid "Unrecognized algorithm type '{}'" 42 | msgstr "Tipo de algoritmo '{}' não reconhecido" 43 | 44 | #: backends.py:96 45 | msgid "You must have cryptography installed to use {}." 46 | msgstr "Você deve ter criptografia instalada para usar {}." 47 | 48 | #: backends.py:111 49 | msgid "" 50 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 51 | msgstr "" 52 | "Tipo '{}' não reconhecido, 'leeway' deve ser do tipo int, float ou timedelta." 53 | 54 | #: backends.py:125 backends.py:177 tokens.py:69 55 | msgid "Token is invalid" 56 | msgstr "O token é inválido" 57 | 58 | #: backends.py:173 59 | msgid "Invalid algorithm specified" 60 | msgstr "Algoritmo inválido especificado" 61 | 62 | #: backends.py:175 tokens.py:67 63 | msgid "Token is expired" 64 | msgstr "Token expirado" 65 | 66 | #: exceptions.py:55 67 | msgid "Token is invalid or expired" 68 | msgstr "Token inválido ou expirado" 69 | 70 | #: serializers.py:35 71 | msgid "No active account found with the given credentials" 72 | msgstr "Usuário e/ou senha incorreto(s)" 73 | 74 | #: serializers.py:108 75 | msgid "No active account found for the given token." 76 | msgstr "Nenhuma conta ativa encontrada para o token fornecido." 77 | 78 | #: serializers.py:178 tokens.py:299 79 | msgid "Token is blacklisted" 80 | msgstr "Token está na blacklist" 81 | 82 | #: settings.py:74 83 | msgid "" 84 | "The '{}' setting has been removed. Please refer to '{}' for available " 85 | "settings." 86 | msgstr "" 87 | "A configuração '{}' foi removida. Por favor, consulte '{}' para disponível " 88 | "definições." 89 | 90 | #: token_blacklist/admin.py:79 91 | msgid "jti" 92 | msgstr "jti" 93 | 94 | #: token_blacklist/admin.py:85 95 | msgid "user" 96 | msgstr "usuário" 97 | 98 | #: token_blacklist/admin.py:91 99 | msgid "created at" 100 | msgstr "criado em" 101 | 102 | #: token_blacklist/admin.py:97 103 | msgid "expires at" 104 | msgstr "expira em" 105 | 106 | #: token_blacklist/apps.py:7 107 | msgid "Token Blacklist" 108 | msgstr "Lista negra de Tokens" 109 | 110 | #: token_blacklist/models.py:19 111 | msgid "Outstanding Token" 112 | msgstr "Token pendente" 113 | 114 | #: token_blacklist/models.py:20 115 | msgid "Outstanding Tokens" 116 | msgstr "Tokens pendentes" 117 | 118 | #: token_blacklist/models.py:32 119 | #, python-format 120 | msgid "Token for %(user)s (%(jti)s)" 121 | msgstr "Token para %(user)s (%(jti)s)" 122 | 123 | #: token_blacklist/models.py:45 124 | msgid "Blacklisted Token" 125 | msgstr "Token na lista negra" 126 | 127 | #: token_blacklist/models.py:46 128 | msgid "Blacklisted Tokens" 129 | msgstr "Tokens na lista negra" 130 | 131 | #: token_blacklist/models.py:57 132 | #, python-format 133 | msgid "Blacklisted token for %(user)s" 134 | msgstr "Token na lista negra para %(user)s" 135 | 136 | #: tokens.py:53 137 | msgid "Cannot create token with no type or lifetime" 138 | msgstr "Não é possível criar token sem tipo ou tempo de vida" 139 | 140 | #: tokens.py:127 141 | msgid "Token has no id" 142 | msgstr "Token não tem id" 143 | 144 | #: tokens.py:139 145 | msgid "Token has no type" 146 | msgstr "Token não tem nenhum tipo" 147 | 148 | #: tokens.py:142 149 | msgid "Token has wrong type" 150 | msgstr "Token tem tipo errado" 151 | 152 | #: tokens.py:201 153 | msgid "Token has no '{}' claim" 154 | msgstr "Token não tem '{}' privilégio" 155 | 156 | #: tokens.py:206 157 | msgid "Token '{}' claim has expired" 158 | msgstr "O privilégio '{}' do token expirou" 159 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/ro/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/ro/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/ro/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR Daniel Cuznetov , 2022. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: Daniel Cuznetov \n" 9 | "Language: ro\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=1; plural=0;\n" 14 | 15 | #: authentication.py:89 16 | msgid "Authorization header must contain two space-delimited values" 17 | msgstr "" 18 | "Header-ul(antetul) de autorizare trebuie să conțină două valori separate " 19 | "prin spațiu" 20 | 21 | #: authentication.py:115 22 | msgid "Given token not valid for any token type" 23 | msgstr "Tokenul dat nu este valid pentru niciun tip de token" 24 | 25 | #: authentication.py:127 authentication.py:162 26 | msgid "Token contained no recognizable user identification" 27 | msgstr "Tokenul nu conține date de identificare a utilizatorului" 28 | 29 | #: authentication.py:132 30 | msgid "User not found" 31 | msgstr "Utilizatorul nu a fost găsit" 32 | 33 | #: authentication.py:135 34 | msgid "User is inactive" 35 | msgstr "Utilizatorul este inactiv" 36 | 37 | #: authentication.py:142 38 | msgid "The user's password has been changed." 39 | msgstr "" 40 | 41 | #: backends.py:90 42 | msgid "Unrecognized algorithm type '{}'" 43 | msgstr "Tipul de algoritm '{}' nu este recunoscut" 44 | 45 | #: backends.py:96 46 | msgid "You must have cryptography installed to use {}." 47 | msgstr "Trebuie să aveți instalată criptografia pentru a utiliza {}." 48 | 49 | #: backends.py:111 50 | msgid "" 51 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 52 | msgstr "" 53 | "Tipul '{}' nu este recunoscut, 'leeway' trebuie să fie de tip int, float sau " 54 | "timedelta." 55 | 56 | #: backends.py:125 backends.py:177 tokens.py:69 57 | #, fuzzy 58 | #| msgid "Token is invalid or expired" 59 | msgid "Token is invalid" 60 | msgstr "Token nu este valid sau a expirat" 61 | 62 | #: backends.py:173 63 | msgid "Invalid algorithm specified" 64 | msgstr "Algoritm nevalid specificat" 65 | 66 | #: backends.py:175 tokens.py:67 67 | #, fuzzy 68 | #| msgid "Token is invalid or expired" 69 | msgid "Token is expired" 70 | msgstr "Token nu este valid sau a expirat" 71 | 72 | #: exceptions.py:55 73 | msgid "Token is invalid or expired" 74 | msgstr "Token nu este valid sau a expirat" 75 | 76 | #: serializers.py:35 77 | msgid "No active account found with the given credentials" 78 | msgstr "Nu a fost găsit cont activ cu aceste date de autentificare" 79 | 80 | #: serializers.py:108 81 | #, fuzzy 82 | #| msgid "No active account found with the given credentials" 83 | msgid "No active account found for the given token." 84 | msgstr "Nu a fost găsit cont activ cu aceste date de autentificare" 85 | 86 | #: serializers.py:178 tokens.py:299 87 | msgid "Token is blacklisted" 88 | msgstr "Tokenul este în listă de tokenuri blocate" 89 | 90 | #: settings.py:74 91 | msgid "" 92 | "The '{}' setting has been removed. Please refer to '{}' for available " 93 | "settings." 94 | msgstr "" 95 | "Setarea '{}' a fost ștearsă. Referați la '{}' pentru setări disponibile." 96 | 97 | #: token_blacklist/admin.py:79 98 | msgid "jti" 99 | msgstr "jti" 100 | 101 | #: token_blacklist/admin.py:85 102 | msgid "user" 103 | msgstr "utilizator" 104 | 105 | #: token_blacklist/admin.py:91 106 | msgid "created at" 107 | msgstr "creat la" 108 | 109 | #: token_blacklist/admin.py:97 110 | msgid "expires at" 111 | msgstr "expiră la" 112 | 113 | #: token_blacklist/apps.py:7 114 | msgid "Token Blacklist" 115 | msgstr "Listă de token-uri blocate" 116 | 117 | #: token_blacklist/models.py:19 118 | msgid "Outstanding Token" 119 | msgstr "" 120 | 121 | #: token_blacklist/models.py:20 122 | msgid "Outstanding Tokens" 123 | msgstr "" 124 | 125 | #: token_blacklist/models.py:32 126 | #, python-format 127 | msgid "Token for %(user)s (%(jti)s)" 128 | msgstr "" 129 | 130 | #: token_blacklist/models.py:45 131 | msgid "Blacklisted Token" 132 | msgstr "" 133 | 134 | #: token_blacklist/models.py:46 135 | msgid "Blacklisted Tokens" 136 | msgstr "" 137 | 138 | #: token_blacklist/models.py:57 139 | #, python-format 140 | msgid "Blacklisted token for %(user)s" 141 | msgstr "" 142 | 143 | #: tokens.py:53 144 | msgid "Cannot create token with no type or lifetime" 145 | msgstr "Nu se poate crea token fără tip sau durată de viață" 146 | 147 | #: tokens.py:127 148 | msgid "Token has no id" 149 | msgstr "Tokenul nu are id" 150 | 151 | #: tokens.py:139 152 | msgid "Token has no type" 153 | msgstr "Tokenul nu are tip" 154 | 155 | #: tokens.py:142 156 | msgid "Token has wrong type" 157 | msgstr "Tokenul are tipul greșit" 158 | 159 | #: tokens.py:201 160 | msgid "Token has no '{}' claim" 161 | msgstr "Tokenul nu are reclamația '{}'" 162 | 163 | #: tokens.py:206 164 | msgid "Token '{}' claim has expired" 165 | msgstr "Reclamația tokenului '{}' a expirat" 166 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/ru_RU/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/ru_RU/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/ru_RU/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2019. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "PO-Revision-Date: \n" 9 | "Last-Translator: Sergey Ozeranskiy \n" 10 | "Language-Team: \n" 11 | "Language: ru_RU\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " 16 | "n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" 17 | "X-Generator: Poedit 2.2.1\n" 18 | 19 | #: authentication.py:89 20 | msgid "Authorization header must contain two space-delimited values" 21 | msgstr "" 22 | "Заголовок авторизации должен содержать два значения, разделенных пробелом" 23 | 24 | #: authentication.py:115 25 | msgid "Given token not valid for any token type" 26 | msgstr "Данный токен недействителен для любого типа токена" 27 | 28 | #: authentication.py:127 authentication.py:162 29 | msgid "Token contained no recognizable user identification" 30 | msgstr "Токен не содержит идентификатор пользователя" 31 | 32 | #: authentication.py:132 33 | msgid "User not found" 34 | msgstr "Пользователь не найден" 35 | 36 | #: authentication.py:135 37 | msgid "User is inactive" 38 | msgstr "Пользователь неактивен" 39 | 40 | #: authentication.py:142 41 | msgid "The user's password has been changed." 42 | msgstr "" 43 | 44 | #: backends.py:90 45 | msgid "Unrecognized algorithm type '{}'" 46 | msgstr "Нераспознанный тип алгоритма '{}'" 47 | 48 | #: backends.py:96 49 | msgid "You must have cryptography installed to use {}." 50 | msgstr "" 51 | 52 | #: backends.py:111 53 | msgid "" 54 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 55 | msgstr "" 56 | 57 | #: backends.py:125 backends.py:177 tokens.py:69 58 | #, fuzzy 59 | #| msgid "Token is invalid or expired" 60 | msgid "Token is invalid" 61 | msgstr "Токен недействителен или просрочен" 62 | 63 | #: backends.py:173 64 | msgid "Invalid algorithm specified" 65 | msgstr "" 66 | 67 | #: backends.py:175 tokens.py:67 68 | #, fuzzy 69 | #| msgid "Token is invalid or expired" 70 | msgid "Token is expired" 71 | msgstr "Токен недействителен или просрочен" 72 | 73 | #: exceptions.py:55 74 | msgid "Token is invalid or expired" 75 | msgstr "Токен недействителен или просрочен" 76 | 77 | #: serializers.py:35 78 | msgid "No active account found with the given credentials" 79 | msgstr "Не найдено активной учетной записи с указанными данными" 80 | 81 | #: serializers.py:108 82 | #, fuzzy 83 | #| msgid "No active account found with the given credentials" 84 | msgid "No active account found for the given token." 85 | msgstr "Не найдено активной учетной записи с указанными данными" 86 | 87 | #: serializers.py:178 tokens.py:299 88 | msgid "Token is blacklisted" 89 | msgstr "Токен занесен в черный список" 90 | 91 | #: settings.py:74 92 | msgid "" 93 | "The '{}' setting has been removed. Please refer to '{}' for available " 94 | "settings." 95 | msgstr "" 96 | "Параметр '{}' был удален. Пожалуйста, обратитесь к '{}' для просмотра " 97 | "доступных настроек." 98 | 99 | #: token_blacklist/admin.py:79 100 | msgid "jti" 101 | msgstr "jti" 102 | 103 | #: token_blacklist/admin.py:85 104 | msgid "user" 105 | msgstr "пользователь" 106 | 107 | #: token_blacklist/admin.py:91 108 | msgid "created at" 109 | msgstr "создан" 110 | 111 | #: token_blacklist/admin.py:97 112 | msgid "expires at" 113 | msgstr "истекает" 114 | 115 | #: token_blacklist/apps.py:7 116 | msgid "Token Blacklist" 117 | msgstr "Token Blacklist" 118 | 119 | #: token_blacklist/models.py:19 120 | msgid "Outstanding Token" 121 | msgstr "" 122 | 123 | #: token_blacklist/models.py:20 124 | msgid "Outstanding Tokens" 125 | msgstr "" 126 | 127 | #: token_blacklist/models.py:32 128 | #, python-format 129 | msgid "Token for %(user)s (%(jti)s)" 130 | msgstr "" 131 | 132 | #: token_blacklist/models.py:45 133 | msgid "Blacklisted Token" 134 | msgstr "" 135 | 136 | #: token_blacklist/models.py:46 137 | msgid "Blacklisted Tokens" 138 | msgstr "" 139 | 140 | #: token_blacklist/models.py:57 141 | #, python-format 142 | msgid "Blacklisted token for %(user)s" 143 | msgstr "" 144 | 145 | #: tokens.py:53 146 | msgid "Cannot create token with no type or lifetime" 147 | msgstr "Невозможно создать токен без типа или времени жизни" 148 | 149 | #: tokens.py:127 150 | msgid "Token has no id" 151 | msgstr "У токена нет идентификатора" 152 | 153 | #: tokens.py:139 154 | msgid "Token has no type" 155 | msgstr "Токен не имеет типа" 156 | 157 | #: tokens.py:142 158 | msgid "Token has wrong type" 159 | msgstr "Токен имеет неправильный тип" 160 | 161 | #: tokens.py:201 162 | msgid "Token has no '{}' claim" 163 | msgstr "Токен не содержит '{}'" 164 | 165 | #: tokens.py:206 166 | msgid "Token '{}' claim has expired" 167 | msgstr "Токен имеет просроченное значение '{}'" 168 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/sl/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/sl/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/sl/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2022. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "PO-Revision-Date: \n" 9 | "Last-Translator: Urban Prevc \n" 10 | "Language-Team: \n" 11 | "Language: sl\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "X-Generator: Poedit 2.0.6\n" 16 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 17 | 18 | #: authentication.py:89 19 | msgid "Authorization header must contain two space-delimited values" 20 | msgstr "" 21 | "Glava 'Authorization' mora vsebovati dve vrednosti, ločeni s presledkom" 22 | 23 | #: authentication.py:115 24 | msgid "Given token not valid for any token type" 25 | msgstr "Podan žeton ni veljaven za nobeno vrsto žetona" 26 | 27 | #: authentication.py:127 authentication.py:162 28 | msgid "Token contained no recognizable user identification" 29 | msgstr "Žeton ni vseboval prepoznavne identifikacije uporabnika" 30 | 31 | #: authentication.py:132 32 | msgid "User not found" 33 | msgstr "Uporabnik ni najden" 34 | 35 | #: authentication.py:135 36 | msgid "User is inactive" 37 | msgstr "Uporabnik je neaktiven" 38 | 39 | #: authentication.py:142 40 | msgid "The user's password has been changed." 41 | msgstr "" 42 | 43 | #: backends.py:90 44 | msgid "Unrecognized algorithm type '{}'" 45 | msgstr "Neprepoznana vrsta algoritma'{}'" 46 | 47 | #: backends.py:96 48 | msgid "You must have cryptography installed to use {}." 49 | msgstr "Za uporabo '{}' je potrebna namestitev 'cryptography'." 50 | 51 | #: backends.py:111 52 | msgid "" 53 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 54 | msgstr "" 55 | "Neprepoznana vrsta '{}', 'leeway' mora biti vrste int, float ali timedelta." 56 | 57 | #: backends.py:125 backends.py:177 tokens.py:69 58 | #, fuzzy 59 | #| msgid "Token is invalid or expired" 60 | msgid "Token is invalid" 61 | msgstr "Žeton je neveljaven ali potekel" 62 | 63 | #: backends.py:173 64 | msgid "Invalid algorithm specified" 65 | msgstr "Naveden algoritem je neveljaven" 66 | 67 | #: backends.py:175 tokens.py:67 68 | #, fuzzy 69 | #| msgid "Token is invalid or expired" 70 | msgid "Token is expired" 71 | msgstr "Žeton je neveljaven ali potekel" 72 | 73 | #: exceptions.py:55 74 | msgid "Token is invalid or expired" 75 | msgstr "Žeton je neveljaven ali potekel" 76 | 77 | #: serializers.py:35 78 | msgid "No active account found with the given credentials" 79 | msgstr "Aktiven račun s podanimi poverilnicami ni najden" 80 | 81 | #: serializers.py:108 82 | #, fuzzy 83 | #| msgid "No active account found with the given credentials" 84 | msgid "No active account found for the given token." 85 | msgstr "Aktiven račun s podanimi poverilnicami ni najden" 86 | 87 | #: serializers.py:178 tokens.py:299 88 | msgid "Token is blacklisted" 89 | msgstr "Žeton je na črnem seznamu" 90 | 91 | #: settings.py:74 92 | msgid "" 93 | "The '{}' setting has been removed. Please refer to '{}' for available " 94 | "settings." 95 | msgstr "" 96 | "Nastavitev '{}' je bila odstranjena. Prosimo, oglejte si '{}' za " 97 | "razpoložljive nastavitve." 98 | 99 | #: token_blacklist/admin.py:79 100 | msgid "jti" 101 | msgstr "jti" 102 | 103 | #: token_blacklist/admin.py:85 104 | msgid "user" 105 | msgstr "uporabnik" 106 | 107 | #: token_blacklist/admin.py:91 108 | msgid "created at" 109 | msgstr "ustvarjen ob" 110 | 111 | #: token_blacklist/admin.py:97 112 | msgid "expires at" 113 | msgstr "poteče ob" 114 | 115 | #: token_blacklist/apps.py:7 116 | msgid "Token Blacklist" 117 | msgstr "Črni seznam žetonov" 118 | 119 | #: token_blacklist/models.py:19 120 | msgid "Outstanding Token" 121 | msgstr "" 122 | 123 | #: token_blacklist/models.py:20 124 | msgid "Outstanding Tokens" 125 | msgstr "" 126 | 127 | #: token_blacklist/models.py:32 128 | #, python-format 129 | msgid "Token for %(user)s (%(jti)s)" 130 | msgstr "" 131 | 132 | #: token_blacklist/models.py:45 133 | msgid "Blacklisted Token" 134 | msgstr "" 135 | 136 | #: token_blacklist/models.py:46 137 | msgid "Blacklisted Tokens" 138 | msgstr "" 139 | 140 | #: token_blacklist/models.py:57 141 | #, python-format 142 | msgid "Blacklisted token for %(user)s" 143 | msgstr "" 144 | 145 | #: tokens.py:53 146 | msgid "Cannot create token with no type or lifetime" 147 | msgstr "Ni mogoče ustvariti žetona brez vrste ali življenjske dobe" 148 | 149 | #: tokens.py:127 150 | msgid "Token has no id" 151 | msgstr "Žetonu manjka id" 152 | 153 | #: tokens.py:139 154 | msgid "Token has no type" 155 | msgstr "Žetonu manjka vrsta" 156 | 157 | #: tokens.py:142 158 | msgid "Token has wrong type" 159 | msgstr "Žeton je napačne vrste" 160 | 161 | #: tokens.py:201 162 | msgid "Token has no '{}' claim" 163 | msgstr "Žeton nima '{}' zahtevka" 164 | 165 | #: tokens.py:206 166 | msgid "Token '{}' claim has expired" 167 | msgstr "'{}' zahtevek žetona je potekel" 168 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/sv/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/sv/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/sv/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR Pasindu , 2022. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: Pasindu \n" 9 | "Language: sv\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 | 15 | #: authentication.py:89 16 | msgid "Authorization header must contain two space-delimited values" 17 | msgstr "Auktoriseringshuvudet måste innehålla två mellanslagsavgränsade värden" 18 | 19 | #: authentication.py:115 20 | msgid "Given token not valid for any token type" 21 | msgstr "Givet token är inte giltigt för någon tokentyp" 22 | 23 | #: authentication.py:127 authentication.py:162 24 | msgid "Token contained no recognizable user identification" 25 | msgstr "Token innehöll ingen identifiering av användaren" 26 | 27 | #: authentication.py:132 28 | msgid "User not found" 29 | msgstr "Användaren hittades inte" 30 | 31 | #: authentication.py:135 32 | msgid "User is inactive" 33 | msgstr "Användaren är inaktiv" 34 | 35 | #: authentication.py:142 36 | msgid "The user's password has been changed." 37 | msgstr "" 38 | 39 | #: backends.py:90 40 | msgid "Unrecognized algorithm type '{}'" 41 | msgstr "Okänd algoritmtyp '{}'" 42 | 43 | #: backends.py:96 44 | msgid "You must have cryptography installed to use {}." 45 | msgstr "Du måste ha kryptografi installerad för att kunna använda {}." 46 | 47 | #: backends.py:111 48 | msgid "" 49 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 50 | msgstr "" 51 | 52 | #: backends.py:125 backends.py:177 tokens.py:69 53 | #, fuzzy 54 | #| msgid "Token is invalid or expired" 55 | msgid "Token is invalid" 56 | msgstr "Token är ogiltig eller har löpt ut" 57 | 58 | #: backends.py:173 59 | msgid "Invalid algorithm specified" 60 | msgstr "Ogiltig algoritm har angetts" 61 | 62 | #: backends.py:175 tokens.py:67 63 | #, fuzzy 64 | #| msgid "Token is invalid or expired" 65 | msgid "Token is expired" 66 | msgstr "Token är ogiltig eller har löpt ut" 67 | 68 | #: exceptions.py:55 69 | msgid "Token is invalid or expired" 70 | msgstr "Token är ogiltig eller har löpt ut" 71 | 72 | #: serializers.py:35 73 | msgid "No active account found with the given credentials" 74 | msgstr "Inget aktivt konto hittades med de angivna användaruppgifterna" 75 | 76 | #: serializers.py:108 77 | #, fuzzy 78 | #| msgid "No active account found with the given credentials" 79 | msgid "No active account found for the given token." 80 | msgstr "Inget aktivt konto hittades med de angivna användaruppgifterna" 81 | 82 | #: serializers.py:178 tokens.py:299 83 | msgid "Token is blacklisted" 84 | msgstr "Token är svartlistad" 85 | 86 | #: settings.py:74 87 | msgid "" 88 | "The '{}' setting has been removed. Please refer to '{}' for available " 89 | "settings." 90 | msgstr "" 91 | "Inställningen '{}' har tagits bort. Se '{}' för tillgängliga inställningar" 92 | 93 | #: token_blacklist/admin.py:79 94 | msgid "jti" 95 | msgstr "jti" 96 | 97 | #: token_blacklist/admin.py:85 98 | msgid "user" 99 | msgstr "användare" 100 | 101 | #: token_blacklist/admin.py:91 102 | msgid "created at" 103 | msgstr "skapad vid" 104 | 105 | #: token_blacklist/admin.py:97 106 | msgid "expires at" 107 | msgstr "går ut kl" 108 | 109 | #: token_blacklist/apps.py:7 110 | msgid "Token Blacklist" 111 | msgstr "Token svartlist" 112 | 113 | #: token_blacklist/models.py:19 114 | msgid "Outstanding Token" 115 | msgstr "" 116 | 117 | #: token_blacklist/models.py:20 118 | msgid "Outstanding Tokens" 119 | msgstr "" 120 | 121 | #: token_blacklist/models.py:32 122 | #, python-format 123 | msgid "Token for %(user)s (%(jti)s)" 124 | msgstr "" 125 | 126 | #: token_blacklist/models.py:45 127 | msgid "Blacklisted Token" 128 | msgstr "" 129 | 130 | #: token_blacklist/models.py:46 131 | msgid "Blacklisted Tokens" 132 | msgstr "" 133 | 134 | #: token_blacklist/models.py:57 135 | #, python-format 136 | msgid "Blacklisted token for %(user)s" 137 | msgstr "" 138 | 139 | #: tokens.py:53 140 | msgid "Cannot create token with no type or lifetime" 141 | msgstr "Kan inte skapa token utan typ eller livslängd" 142 | 143 | #: tokens.py:127 144 | msgid "Token has no id" 145 | msgstr "Token har inget id" 146 | 147 | #: tokens.py:139 148 | msgid "Token has no type" 149 | msgstr "Token har ingen typ" 150 | 151 | #: tokens.py:142 152 | msgid "Token has wrong type" 153 | msgstr "Token har fel typ" 154 | 155 | #: tokens.py:201 156 | msgid "Token has no '{}' claim" 157 | msgstr "Token har inget '{}'-anspråk" 158 | 159 | #: tokens.py:206 160 | msgid "Token '{}' claim has expired" 161 | msgstr "Token '{}'-anspråket har löpt ut" 162 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/tr/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/tr/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/tr/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # FIRST AUTHOR , 2022. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: djangorestframework_simplejwt\n" 6 | "Report-Msgid-Bugs-To: \n" 7 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 8 | "Last-Translator: Şuayip Üzülmez \n" 9 | "Language: tr\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 14 | 15 | #: authentication.py:89 16 | msgid "Authorization header must contain two space-delimited values" 17 | msgstr "" 18 | "Yetkilendirme header'i boşlukla sınırlandırılmış iki değer bulundurmak " 19 | "zorunda" 20 | 21 | #: authentication.py:115 22 | msgid "Given token not valid for any token type" 23 | msgstr "Verilen token hiçbir token tipi için geçerli değil" 24 | 25 | #: authentication.py:127 authentication.py:162 26 | msgid "Token contained no recognizable user identification" 27 | msgstr "Token tanınabilir bir kullanıcı kimliği içermiyor" 28 | 29 | #: authentication.py:132 30 | msgid "User not found" 31 | msgstr "Kullanıcı bulunamadı" 32 | 33 | #: authentication.py:135 34 | msgid "User is inactive" 35 | msgstr "Kullanıcı etkin değil" 36 | 37 | #: authentication.py:142 38 | msgid "The user's password has been changed." 39 | msgstr "" 40 | 41 | #: backends.py:90 42 | msgid "Unrecognized algorithm type '{}'" 43 | msgstr "Tanınmayan algortima tipi '{}'" 44 | 45 | #: backends.py:96 46 | msgid "You must have cryptography installed to use {}." 47 | msgstr "{} kullanmak için cryptography yüklemeniz gerekiyor." 48 | 49 | #: backends.py:111 50 | msgid "" 51 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 52 | msgstr "" 53 | 54 | #: backends.py:125 backends.py:177 tokens.py:69 55 | #, fuzzy 56 | #| msgid "Token is invalid or expired" 57 | msgid "Token is invalid" 58 | msgstr "Token geçersiz veya süresi geçmiş" 59 | 60 | #: backends.py:173 61 | msgid "Invalid algorithm specified" 62 | msgstr "Geçersiz algoritma belirtildi" 63 | 64 | #: backends.py:175 tokens.py:67 65 | #, fuzzy 66 | #| msgid "Token is invalid or expired" 67 | msgid "Token is expired" 68 | msgstr "Token geçersiz veya süresi geçmiş" 69 | 70 | #: exceptions.py:55 71 | msgid "Token is invalid or expired" 72 | msgstr "Token geçersiz veya süresi geçmiş" 73 | 74 | #: serializers.py:35 75 | msgid "No active account found with the given credentials" 76 | msgstr "Verilen kimlik bilgileriyle aktif bir hesap bulunamadı" 77 | 78 | #: serializers.py:108 79 | #, fuzzy 80 | #| msgid "No active account found with the given credentials" 81 | msgid "No active account found for the given token." 82 | msgstr "Verilen kimlik bilgileriyle aktif bir hesap bulunamadı" 83 | 84 | #: serializers.py:178 tokens.py:299 85 | msgid "Token is blacklisted" 86 | msgstr "Token kara listeye alınmış" 87 | 88 | #: settings.py:74 89 | msgid "" 90 | "The '{}' setting has been removed. Please refer to '{}' for available " 91 | "settings." 92 | msgstr "'{}' ayarı kaldırıldı. Mevcut ayarlar için '{}' adresini ziyaret edin." 93 | 94 | #: token_blacklist/admin.py:79 95 | msgid "jti" 96 | msgstr "jti" 97 | 98 | #: token_blacklist/admin.py:85 99 | msgid "user" 100 | msgstr "kullanıcı" 101 | 102 | #: token_blacklist/admin.py:91 103 | msgid "created at" 104 | msgstr "oluşturulma tarihi" 105 | 106 | #: token_blacklist/admin.py:97 107 | msgid "expires at" 108 | msgstr "sona erme tarihi" 109 | 110 | #: token_blacklist/apps.py:7 111 | msgid "Token Blacklist" 112 | msgstr "Token Kara Listesi" 113 | 114 | #: token_blacklist/models.py:19 115 | msgid "Outstanding Token" 116 | msgstr "" 117 | 118 | #: token_blacklist/models.py:20 119 | msgid "Outstanding Tokens" 120 | msgstr "" 121 | 122 | #: token_blacklist/models.py:32 123 | #, python-format 124 | msgid "Token for %(user)s (%(jti)s)" 125 | msgstr "" 126 | 127 | #: token_blacklist/models.py:45 128 | msgid "Blacklisted Token" 129 | msgstr "" 130 | 131 | #: token_blacklist/models.py:46 132 | msgid "Blacklisted Tokens" 133 | msgstr "" 134 | 135 | #: token_blacklist/models.py:57 136 | #, python-format 137 | msgid "Blacklisted token for %(user)s" 138 | msgstr "" 139 | 140 | #: tokens.py:53 141 | msgid "Cannot create token with no type or lifetime" 142 | msgstr "Tipi veya geçerlilik süresi olmayan token oluşturulamaz" 143 | 144 | #: tokens.py:127 145 | msgid "Token has no id" 146 | msgstr "Token'in id'si yok" 147 | 148 | #: tokens.py:139 149 | msgid "Token has no type" 150 | msgstr "Token'in tipi yok" 151 | 152 | #: tokens.py:142 153 | msgid "Token has wrong type" 154 | msgstr "Token'in tipi yanlış" 155 | 156 | #: tokens.py:201 157 | msgid "Token has no '{}' claim" 158 | msgstr "Token'in '{}' claim'i yok" 159 | 160 | #: tokens.py:206 161 | msgid "Token '{}' claim has expired" 162 | msgstr "Token'in '{}' claim'i sona erdi" 163 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/uk_UA/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/uk_UA/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/uk_UA/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # Artiukhov Artem , 2021. 3 | # 4 | #, fuzzy 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: djangorestframework_simplejwt\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: Artiukhov Artem \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: uk_UA\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #: authentication.py:89 19 | msgid "Authorization header must contain two space-delimited values" 20 | msgstr "Авторизаційний заголовок має містити два значення розділені пробілом" 21 | 22 | #: authentication.py:115 23 | msgid "Given token not valid for any token type" 24 | msgstr "Наданий токен не відповідає жодному типу ключа" 25 | 26 | #: authentication.py:127 authentication.py:162 27 | msgid "Token contained no recognizable user identification" 28 | msgstr "Наданий токен не мітить жодної ідентифікаційної інформації" 29 | 30 | #: authentication.py:132 31 | msgid "User not found" 32 | msgstr "Користувач не знайдений" 33 | 34 | #: authentication.py:135 35 | msgid "User is inactive" 36 | msgstr "Користувач неактивний" 37 | 38 | #: authentication.py:142 39 | msgid "The user's password has been changed." 40 | msgstr "" 41 | 42 | #: backends.py:90 43 | msgid "Unrecognized algorithm type '{}'" 44 | msgstr "Тип алгоритму '{}' не розпізнаний" 45 | 46 | #: backends.py:96 47 | msgid "You must have cryptography installed to use {}." 48 | msgstr "Встановіть модуль cryptography щоб використовувати {}" 49 | 50 | #: backends.py:111 51 | msgid "" 52 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 53 | msgstr "" 54 | 55 | #: backends.py:125 backends.py:177 tokens.py:69 56 | #, fuzzy 57 | #| msgid "Token is invalid or expired" 58 | msgid "Token is invalid" 59 | msgstr "Токен некоректний або термін його дії вичерпаний" 60 | 61 | #: backends.py:173 62 | msgid "Invalid algorithm specified" 63 | msgstr "Вказаний невірний алгоритм" 64 | 65 | #: backends.py:175 tokens.py:67 66 | #, fuzzy 67 | #| msgid "Token is invalid or expired" 68 | msgid "Token is expired" 69 | msgstr "Токен некоректний або термін його дії вичерпаний" 70 | 71 | #: exceptions.py:55 72 | msgid "Token is invalid or expired" 73 | msgstr "Токен некоректний або термін його дії вичерпаний" 74 | 75 | #: serializers.py:35 76 | msgid "No active account found with the given credentials" 77 | msgstr "Не знайдено жодного облікового запису по наданих облікових даних" 78 | 79 | #: serializers.py:108 80 | #, fuzzy 81 | #| msgid "No active account found with the given credentials" 82 | msgid "No active account found for the given token." 83 | msgstr "Не знайдено жодного облікового запису по наданих облікових даних" 84 | 85 | #: serializers.py:178 tokens.py:299 86 | msgid "Token is blacklisted" 87 | msgstr "Токен занесений у чорний список" 88 | 89 | #: settings.py:74 90 | msgid "" 91 | "The '{}' setting has been removed. Please refer to '{}' for available " 92 | "settings." 93 | msgstr "Налаштування '{}' видалене. Подивіться у '{}' для інших доступних" 94 | 95 | #: token_blacklist/admin.py:79 96 | msgid "jti" 97 | msgstr "jti" 98 | 99 | #: token_blacklist/admin.py:85 100 | msgid "user" 101 | msgstr "користувач" 102 | 103 | #: token_blacklist/admin.py:91 104 | msgid "created at" 105 | msgstr "створений о" 106 | 107 | #: token_blacklist/admin.py:97 108 | msgid "expires at" 109 | msgstr "дійстний по" 110 | 111 | #: token_blacklist/apps.py:7 112 | msgid "Token Blacklist" 113 | msgstr "Чорний список токенів" 114 | 115 | #: token_blacklist/models.py:19 116 | msgid "Outstanding Token" 117 | msgstr "" 118 | 119 | #: token_blacklist/models.py:20 120 | msgid "Outstanding Tokens" 121 | msgstr "" 122 | 123 | #: token_blacklist/models.py:32 124 | #, python-format 125 | msgid "Token for %(user)s (%(jti)s)" 126 | msgstr "" 127 | 128 | #: token_blacklist/models.py:45 129 | msgid "Blacklisted Token" 130 | msgstr "" 131 | 132 | #: token_blacklist/models.py:46 133 | msgid "Blacklisted Tokens" 134 | msgstr "" 135 | 136 | #: token_blacklist/models.py:57 137 | #, python-format 138 | msgid "Blacklisted token for %(user)s" 139 | msgstr "" 140 | 141 | #: tokens.py:53 142 | msgid "Cannot create token with no type or lifetime" 143 | msgstr "Неможливо створити токен без типу або строку дії" 144 | 145 | #: tokens.py:127 146 | msgid "Token has no id" 147 | msgstr "У ключі доступу не міститься id" 148 | 149 | #: tokens.py:139 150 | msgid "Token has no type" 151 | msgstr "У ключі доступу не міститься тип" 152 | 153 | #: tokens.py:142 154 | msgid "Token has wrong type" 155 | msgstr "токен позначений невірним типом" 156 | 157 | #: tokens.py:201 158 | msgid "Token has no '{}' claim" 159 | msgstr "У токені не міститься '{}' заголовку" 160 | 161 | #: tokens.py:206 162 | msgid "Token '{}' claim has expired" 163 | msgstr "Заголовок '{}' токена не дійсний" 164 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/zh_Hans/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/locale/zh_Hans/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /rest_framework_simplejwt/locale/zh_Hans/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) 2021 3 | # This file is distributed under the same license as the Simple JWT package. 4 | # zengqiu , 2021. 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: djangorestframework_simplejwt\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2025-02-28 15:09-0300\n" 10 | "PO-Revision-Date: 2021-06-23 13:29+080\n" 11 | "Last-Translator: zengqiu \n" 12 | "Language: zh_Hans\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "Plural-Forms: nplurals=1; plural=0;\n" 17 | 18 | #: authentication.py:89 19 | msgid "Authorization header must contain two space-delimited values" 20 | msgstr "授权头必须包含两个用空格分隔的值" 21 | 22 | #: authentication.py:115 23 | msgid "Given token not valid for any token type" 24 | msgstr "此令牌对任何类型的令牌无效" 25 | 26 | #: authentication.py:127 authentication.py:162 27 | msgid "Token contained no recognizable user identification" 28 | msgstr "令牌未包含用户标识符" 29 | 30 | #: authentication.py:132 31 | msgid "User not found" 32 | msgstr "未找到该用户" 33 | 34 | #: authentication.py:135 35 | msgid "User is inactive" 36 | msgstr "该用户已禁用" 37 | 38 | #: authentication.py:142 39 | msgid "The user's password has been changed." 40 | msgstr "" 41 | 42 | #: backends.py:90 43 | msgid "Unrecognized algorithm type '{}'" 44 | msgstr "未知算法类型 '{}'" 45 | 46 | #: backends.py:96 47 | msgid "You must have cryptography installed to use {}." 48 | msgstr "你必须安装 cryptography 才能使用 {}。" 49 | 50 | #: backends.py:111 51 | msgid "" 52 | "Unrecognized type '{}', 'leeway' must be of type int, float or timedelta." 53 | msgstr "" 54 | 55 | #: backends.py:125 backends.py:177 tokens.py:69 56 | #, fuzzy 57 | #| msgid "Token is invalid or expired" 58 | msgid "Token is invalid" 59 | msgstr "令牌无效或已过期" 60 | 61 | #: backends.py:173 62 | msgid "Invalid algorithm specified" 63 | msgstr "指定的算法无效" 64 | 65 | #: backends.py:175 tokens.py:67 66 | #, fuzzy 67 | #| msgid "Token is invalid or expired" 68 | msgid "Token is expired" 69 | msgstr "令牌无效或已过期" 70 | 71 | #: exceptions.py:55 72 | msgid "Token is invalid or expired" 73 | msgstr "令牌无效或已过期" 74 | 75 | #: serializers.py:35 76 | msgid "No active account found with the given credentials" 77 | msgstr "找不到指定凭据对应的有效用户" 78 | 79 | #: serializers.py:108 80 | #, fuzzy 81 | #| msgid "No active account found with the given credentials" 82 | msgid "No active account found for the given token." 83 | msgstr "找不到指定凭据对应的有效用户" 84 | 85 | #: serializers.py:178 tokens.py:299 86 | msgid "Token is blacklisted" 87 | msgstr "令牌已被加入黑名单" 88 | 89 | #: settings.py:74 90 | msgid "" 91 | "The '{}' setting has been removed. Please refer to '{}' for available " 92 | "settings." 93 | msgstr "'{}' 配置已被移除。 请参阅 '{}' 获取可用的配置。" 94 | 95 | #: token_blacklist/admin.py:79 96 | msgid "jti" 97 | msgstr "jti" 98 | 99 | #: token_blacklist/admin.py:85 100 | msgid "user" 101 | msgstr "用户" 102 | 103 | #: token_blacklist/admin.py:91 104 | msgid "created at" 105 | msgstr "创建时间" 106 | 107 | #: token_blacklist/admin.py:97 108 | msgid "expires at" 109 | msgstr "过期时间" 110 | 111 | #: token_blacklist/apps.py:7 112 | msgid "Token Blacklist" 113 | msgstr "令牌黑名单" 114 | 115 | #: token_blacklist/models.py:19 116 | msgid "Outstanding Token" 117 | msgstr "" 118 | 119 | #: token_blacklist/models.py:20 120 | msgid "Outstanding Tokens" 121 | msgstr "" 122 | 123 | #: token_blacklist/models.py:32 124 | #, python-format 125 | msgid "Token for %(user)s (%(jti)s)" 126 | msgstr "" 127 | 128 | #: token_blacklist/models.py:45 129 | msgid "Blacklisted Token" 130 | msgstr "" 131 | 132 | #: token_blacklist/models.py:46 133 | msgid "Blacklisted Tokens" 134 | msgstr "" 135 | 136 | #: token_blacklist/models.py:57 137 | #, python-format 138 | msgid "Blacklisted token for %(user)s" 139 | msgstr "" 140 | 141 | #: tokens.py:53 142 | msgid "Cannot create token with no type or lifetime" 143 | msgstr "无法创建没有类型或生存期的令牌" 144 | 145 | #: tokens.py:127 146 | msgid "Token has no id" 147 | msgstr "令牌没有标识符" 148 | 149 | #: tokens.py:139 150 | msgid "Token has no type" 151 | msgstr "令牌没有类型" 152 | 153 | #: tokens.py:142 154 | msgid "Token has wrong type" 155 | msgstr "令牌类型错误" 156 | 157 | #: tokens.py:201 158 | msgid "Token has no '{}' claim" 159 | msgstr "令牌没有 '{}' 声明" 160 | 161 | #: tokens.py:206 162 | msgid "Token '{}' claim has expired" 163 | msgstr "令牌 '{}' 声明已过期" 164 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/models.py: -------------------------------------------------------------------------------- 1 | from typing import TYPE_CHECKING, Any, Optional, Union 2 | 3 | from django.contrib.auth import models as auth_models 4 | from django.db.models.manager import EmptyManager 5 | from django.utils.functional import cached_property 6 | 7 | from .settings import api_settings 8 | 9 | if TYPE_CHECKING: 10 | from .tokens import Token 11 | 12 | 13 | class TokenUser: 14 | """ 15 | A dummy user class modeled after django.contrib.auth.models.AnonymousUser. 16 | Used in conjunction with the `JWTStatelessUserAuthentication` backend to 17 | implement single sign-on functionality across services which share the same 18 | secret key. `JWTStatelessUserAuthentication` will return an instance of this 19 | class instead of a `User` model instance. Instances of this class act as 20 | stateless user objects which are backed by validated tokens. 21 | """ 22 | 23 | # User is always active since Simple JWT will never issue a token for an 24 | # inactive user 25 | is_active = True 26 | 27 | _groups = EmptyManager(auth_models.Group) 28 | _user_permissions = EmptyManager(auth_models.Permission) 29 | 30 | def __init__(self, token: "Token") -> None: 31 | self.token = token 32 | 33 | def __str__(self) -> str: 34 | return f"TokenUser {self.id}" 35 | 36 | @cached_property 37 | def id(self) -> Union[int, str]: 38 | return self.token[api_settings.USER_ID_CLAIM] 39 | 40 | @cached_property 41 | def pk(self) -> Union[int, str]: 42 | return self.id 43 | 44 | @cached_property 45 | def username(self) -> str: 46 | return self.token.get("username", "") 47 | 48 | @cached_property 49 | def is_staff(self) -> bool: 50 | return self.token.get("is_staff", False) 51 | 52 | @cached_property 53 | def is_superuser(self) -> bool: 54 | return self.token.get("is_superuser", False) 55 | 56 | def __eq__(self, other: object) -> bool: 57 | if not isinstance(other, TokenUser): 58 | return NotImplemented 59 | return self.id == other.id 60 | 61 | def __ne__(self, other: object) -> bool: 62 | return not self.__eq__(other) 63 | 64 | def __hash__(self) -> int: 65 | return hash(self.id) 66 | 67 | def save(self) -> None: 68 | raise NotImplementedError("Token users have no DB representation") 69 | 70 | def delete(self) -> None: 71 | raise NotImplementedError("Token users have no DB representation") 72 | 73 | def set_password(self, raw_password: str) -> None: 74 | raise NotImplementedError("Token users have no DB representation") 75 | 76 | def check_password(self, raw_password: str) -> None: 77 | raise NotImplementedError("Token users have no DB representation") 78 | 79 | @property 80 | def groups(self) -> auth_models.Group: 81 | return self._groups 82 | 83 | @property 84 | def user_permissions(self) -> auth_models.Permission: 85 | return self._user_permissions 86 | 87 | def get_group_permissions(self, obj: Optional[object] = None) -> set: 88 | return set() 89 | 90 | def get_all_permissions(self, obj: Optional[object] = None) -> set: 91 | return set() 92 | 93 | def has_perm(self, perm: str, obj: Optional[object] = None) -> bool: 94 | return False 95 | 96 | def has_perms(self, perm_list: list[str], obj: Optional[object] = None) -> bool: 97 | return False 98 | 99 | def has_module_perms(self, module: str) -> bool: 100 | return False 101 | 102 | @property 103 | def is_anonymous(self) -> bool: 104 | return False 105 | 106 | @property 107 | def is_authenticated(self) -> bool: 108 | return True 109 | 110 | def get_username(self) -> str: 111 | return self.username 112 | 113 | def __getattr__(self, attr: str) -> Optional[Any]: 114 | """This acts as a backup attribute getter for custom claims defined in Token serializers.""" 115 | return self.token.get(attr, None) 116 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/py.typed -------------------------------------------------------------------------------- /rest_framework_simplejwt/settings.py: -------------------------------------------------------------------------------- 1 | from datetime import timedelta 2 | from typing import Any 3 | 4 | from django.conf import settings 5 | from django.test.signals import setting_changed 6 | from django.utils.translation import gettext_lazy as _ 7 | from rest_framework.settings import APISettings as _APISettings 8 | 9 | from .utils import format_lazy 10 | 11 | USER_SETTINGS = getattr(settings, "SIMPLE_JWT", None) 12 | 13 | DEFAULTS = { 14 | "ACCESS_TOKEN_LIFETIME": timedelta(minutes=5), 15 | "REFRESH_TOKEN_LIFETIME": timedelta(days=1), 16 | "ROTATE_REFRESH_TOKENS": False, 17 | "BLACKLIST_AFTER_ROTATION": False, 18 | "UPDATE_LAST_LOGIN": False, 19 | "ALGORITHM": "HS256", 20 | "SIGNING_KEY": settings.SECRET_KEY, 21 | "VERIFYING_KEY": "", 22 | "AUDIENCE": None, 23 | "ISSUER": None, 24 | "JSON_ENCODER": None, 25 | "JWK_URL": None, 26 | "LEEWAY": 0, 27 | "AUTH_HEADER_TYPES": ("Bearer",), 28 | "AUTH_HEADER_NAME": "HTTP_AUTHORIZATION", 29 | "USER_ID_FIELD": "id", 30 | "USER_ID_CLAIM": "user_id", 31 | "USER_AUTHENTICATION_RULE": "rest_framework_simplejwt.authentication.default_user_authentication_rule", 32 | "AUTH_TOKEN_CLASSES": ("rest_framework_simplejwt.tokens.AccessToken",), 33 | "TOKEN_TYPE_CLAIM": "token_type", 34 | "JTI_CLAIM": "jti", 35 | "TOKEN_USER_CLASS": "rest_framework_simplejwt.models.TokenUser", 36 | "SLIDING_TOKEN_REFRESH_EXP_CLAIM": "refresh_exp", 37 | "SLIDING_TOKEN_LIFETIME": timedelta(minutes=5), 38 | "SLIDING_TOKEN_REFRESH_LIFETIME": timedelta(days=1), 39 | "TOKEN_OBTAIN_SERIALIZER": "rest_framework_simplejwt.serializers.TokenObtainPairSerializer", 40 | "TOKEN_REFRESH_SERIALIZER": "rest_framework_simplejwt.serializers.TokenRefreshSerializer", 41 | "TOKEN_VERIFY_SERIALIZER": "rest_framework_simplejwt.serializers.TokenVerifySerializer", 42 | "TOKEN_BLACKLIST_SERIALIZER": "rest_framework_simplejwt.serializers.TokenBlacklistSerializer", 43 | "SLIDING_TOKEN_OBTAIN_SERIALIZER": "rest_framework_simplejwt.serializers.TokenObtainSlidingSerializer", 44 | "SLIDING_TOKEN_REFRESH_SERIALIZER": "rest_framework_simplejwt.serializers.TokenRefreshSlidingSerializer", 45 | "CHECK_REVOKE_TOKEN": False, 46 | "REVOKE_TOKEN_CLAIM": "hash_password", 47 | "CHECK_USER_IS_ACTIVE": True, 48 | } 49 | 50 | IMPORT_STRINGS = ( 51 | "AUTH_TOKEN_CLASSES", 52 | "JSON_ENCODER", 53 | "TOKEN_USER_CLASS", 54 | "USER_AUTHENTICATION_RULE", 55 | ) 56 | 57 | REMOVED_SETTINGS = ( 58 | "AUTH_HEADER_TYPE", 59 | "AUTH_TOKEN_CLASS", 60 | "SECRET_KEY", 61 | "TOKEN_BACKEND_CLASS", 62 | ) 63 | 64 | 65 | class APISettings(_APISettings): # pragma: no cover 66 | def __check_user_settings(self, user_settings: dict[str, Any]) -> dict[str, Any]: 67 | SETTINGS_DOC = "https://django-rest-framework-simplejwt.readthedocs.io/en/latest/settings.html" 68 | 69 | for setting in REMOVED_SETTINGS: 70 | if setting in user_settings: 71 | raise RuntimeError( 72 | format_lazy( 73 | _( 74 | "The '{}' setting has been removed. Please refer to '{}' for available settings." 75 | ), 76 | setting, 77 | SETTINGS_DOC, 78 | ) 79 | ) 80 | 81 | return user_settings 82 | 83 | 84 | api_settings = APISettings(USER_SETTINGS, DEFAULTS, IMPORT_STRINGS) 85 | 86 | 87 | def reload_api_settings(*args, **kwargs) -> None: # pragma: no cover 88 | global api_settings 89 | 90 | setting, value = kwargs["setting"], kwargs["value"] 91 | 92 | if setting == "SIMPLE_JWT": 93 | api_settings = APISettings(value, DEFAULTS, IMPORT_STRINGS) 94 | 95 | 96 | setting_changed.connect(reload_api_settings) 97 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/state.py: -------------------------------------------------------------------------------- 1 | from .backends import TokenBackend 2 | from .settings import api_settings 3 | 4 | token_backend = TokenBackend( 5 | api_settings.ALGORITHM, 6 | api_settings.SIGNING_KEY, 7 | api_settings.VERIFYING_KEY, 8 | api_settings.AUDIENCE, 9 | api_settings.ISSUER, 10 | api_settings.JWK_URL, 11 | api_settings.LEEWAY, 12 | api_settings.JSON_ENCODER, 13 | ) 14 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/__init__.py: -------------------------------------------------------------------------------- 1 | from django import VERSION 2 | 3 | if VERSION < (3, 2): 4 | default_app_config = ( 5 | "rest_framework_simplejwt.token_blacklist.apps.TokenBlacklistConfig" 6 | ) 7 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/admin.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | from typing import Any, Optional, TypeVar 3 | 4 | from django.contrib import admin 5 | from django.contrib.auth.models import AbstractBaseUser 6 | from django.db.models import QuerySet 7 | from django.utils.translation import gettext_lazy as _ 8 | from rest_framework.request import Request 9 | 10 | from ..models import TokenUser 11 | from .models import BlacklistedToken, OutstandingToken 12 | 13 | AuthUser = TypeVar("AuthUser", AbstractBaseUser, TokenUser) 14 | 15 | 16 | class OutstandingTokenAdmin(admin.ModelAdmin): 17 | list_display = ( 18 | "jti", 19 | "user", 20 | "created_at", 21 | "expires_at", 22 | ) 23 | search_fields = ( 24 | "user__id", 25 | "jti", 26 | ) 27 | ordering = ("user",) 28 | 29 | def get_queryset(self, *args, **kwargs) -> QuerySet: 30 | qs = super().get_queryset(*args, **kwargs) 31 | 32 | return qs.select_related("user") 33 | 34 | # Read-only behavior defined below 35 | actions = None 36 | 37 | def get_readonly_fields(self, *args, **kwargs) -> list[Any]: 38 | return [f.name for f in self.model._meta.fields] 39 | 40 | def has_add_permission(self, *args, **kwargs) -> bool: 41 | return False 42 | 43 | def has_delete_permission(self, *args, **kwargs) -> bool: 44 | return False 45 | 46 | def has_change_permission( 47 | self, request: Request, obj: Optional[object] = None 48 | ) -> bool: 49 | return request.method in ["GET", "HEAD"] and super().has_change_permission( 50 | request, obj 51 | ) 52 | 53 | 54 | admin.site.register(OutstandingToken, OutstandingTokenAdmin) 55 | 56 | 57 | class BlacklistedTokenAdmin(admin.ModelAdmin): 58 | list_display = ( 59 | "token_jti", 60 | "token_user", 61 | "token_created_at", 62 | "token_expires_at", 63 | "blacklisted_at", 64 | ) 65 | search_fields = ( 66 | "token__user__id", 67 | "token__jti", 68 | ) 69 | ordering = ("token__user",) 70 | 71 | def get_queryset(self, *args, **kwargs) -> QuerySet: 72 | qs = super().get_queryset(*args, **kwargs) 73 | 74 | return qs.select_related("token__user") 75 | 76 | def token_jti(self, obj: BlacklistedToken) -> str: 77 | return obj.token.jti 78 | 79 | token_jti.short_description = _("jti") # type: ignore 80 | token_jti.admin_order_field = "token__jti" # type: ignore 81 | 82 | def token_user(self, obj: BlacklistedToken) -> AuthUser: 83 | return obj.token.user 84 | 85 | token_user.short_description = _("user") # type: ignore 86 | token_user.admin_order_field = "token__user" # type: ignore 87 | 88 | def token_created_at(self, obj: BlacklistedToken) -> datetime: 89 | return obj.token.created_at 90 | 91 | token_created_at.short_description = _("created at") # type: ignore 92 | token_created_at.admin_order_field = "token__created_at" # type: ignore 93 | 94 | def token_expires_at(self, obj: BlacklistedToken) -> datetime: 95 | return obj.token.expires_at 96 | 97 | token_expires_at.short_description = _("expires at") # type: ignore 98 | token_expires_at.admin_order_field = "token__expires_at" # type: ignore 99 | 100 | 101 | admin.site.register(BlacklistedToken, BlacklistedTokenAdmin) 102 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | 5 | class TokenBlacklistConfig(AppConfig): 6 | name = "rest_framework_simplejwt.token_blacklist" 7 | verbose_name = _("Token Blacklist") 8 | default_auto_field = "django.db.models.BigAutoField" 9 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/token_blacklist/management/__init__.py -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/token_blacklist/management/commands/__init__.py -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/management/commands/flushexpiredtokens.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import BaseCommand 2 | 3 | from rest_framework_simplejwt.utils import aware_utcnow 4 | 5 | from ...models import OutstandingToken 6 | 7 | 8 | class Command(BaseCommand): 9 | help = "Flushes any expired tokens in the outstanding token list" 10 | 11 | def handle(self, *args, **kwargs) -> None: 12 | OutstandingToken.objects.filter(expires_at__lte=aware_utcnow()).delete() 13 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | import django.db.models.deletion 2 | from django.conf import settings 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | initial = True 8 | 9 | dependencies = [ 10 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name="BlacklistedToken", 16 | fields=[ 17 | ( 18 | "id", 19 | models.AutoField( 20 | auto_created=True, 21 | primary_key=True, 22 | serialize=False, 23 | verbose_name="ID", 24 | ), 25 | ), 26 | ("blacklisted_at", models.DateTimeField(auto_now_add=True)), 27 | ], 28 | ), 29 | migrations.CreateModel( 30 | name="OutstandingToken", 31 | fields=[ 32 | ( 33 | "id", 34 | models.AutoField( 35 | auto_created=True, 36 | primary_key=True, 37 | serialize=False, 38 | verbose_name="ID", 39 | ), 40 | ), 41 | ("jti", models.UUIDField(unique=True)), 42 | ("token", models.TextField()), 43 | ("created_at", models.DateTimeField()), 44 | ("expires_at", models.DateTimeField()), 45 | ( 46 | "user", 47 | models.ForeignKey( 48 | on_delete=django.db.models.deletion.CASCADE, 49 | to=settings.AUTH_USER_MODEL, 50 | ), 51 | ), 52 | ], 53 | options={ 54 | "ordering": ("user",), 55 | }, 56 | ), 57 | migrations.AddField( 58 | model_name="blacklistedtoken", 59 | name="token", 60 | field=models.OneToOneField( 61 | on_delete=django.db.models.deletion.CASCADE, 62 | to="token_blacklist.OutstandingToken", 63 | ), 64 | ), 65 | ] 66 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0002_outstandingtoken_jti_hex.py: -------------------------------------------------------------------------------- 1 | from django.db import migrations, models 2 | 3 | 4 | class Migration(migrations.Migration): 5 | dependencies = [ 6 | ("token_blacklist", "0001_initial"), 7 | ] 8 | 9 | operations = [ 10 | migrations.AddField( 11 | model_name="outstandingtoken", 12 | name="jti_hex", 13 | field=models.CharField(blank=True, null=True, max_length=255), 14 | ), 15 | ] 16 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0003_auto_20171017_2007.py: -------------------------------------------------------------------------------- 1 | from uuid import UUID 2 | 3 | from django.db import migrations 4 | 5 | 6 | def populate_jti_hex(apps, schema_editor): 7 | OutstandingToken = apps.get_model("token_blacklist", "OutstandingToken") 8 | 9 | db_alias = schema_editor.connection.alias 10 | for token in OutstandingToken.objects.using(db_alias).all(): 11 | token.jti_hex = token.jti.hex 12 | token.save() 13 | 14 | 15 | def reverse_populate_jti_hex(apps, schema_editor): # pragma: no cover 16 | OutstandingToken = apps.get_model("token_blacklist", "OutstandingToken") 17 | 18 | db_alias = schema_editor.connection.alias 19 | for token in OutstandingToken.objects.using(db_alias).all(): 20 | token.jti = UUID(hex=token.jti_hex) 21 | token.save() 22 | 23 | 24 | class Migration(migrations.Migration): 25 | dependencies = [ 26 | ("token_blacklist", "0002_outstandingtoken_jti_hex"), 27 | ] 28 | 29 | operations = [ 30 | migrations.RunPython(populate_jti_hex, reverse_populate_jti_hex), 31 | ] 32 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0004_auto_20171017_2013.py: -------------------------------------------------------------------------------- 1 | from django.db import migrations, models 2 | 3 | 4 | class Migration(migrations.Migration): 5 | dependencies = [ 6 | ("token_blacklist", "0003_auto_20171017_2007"), 7 | ] 8 | 9 | operations = [ 10 | migrations.AlterField( 11 | model_name="outstandingtoken", 12 | name="jti_hex", 13 | field=models.CharField(unique=True, max_length=255), 14 | ), 15 | ] 16 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0005_remove_outstandingtoken_jti.py: -------------------------------------------------------------------------------- 1 | from django.db import migrations 2 | 3 | 4 | class Migration(migrations.Migration): 5 | dependencies = [ 6 | ("token_blacklist", "0004_auto_20171017_2013"), 7 | ] 8 | 9 | operations = [ 10 | migrations.RemoveField( 11 | model_name="outstandingtoken", 12 | name="jti", 13 | ), 14 | ] 15 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0006_auto_20171017_2113.py: -------------------------------------------------------------------------------- 1 | from django.db import migrations 2 | 3 | 4 | class Migration(migrations.Migration): 5 | dependencies = [ 6 | ("token_blacklist", "0005_remove_outstandingtoken_jti"), 7 | ] 8 | 9 | operations = [ 10 | migrations.RenameField( 11 | model_name="outstandingtoken", 12 | old_name="jti_hex", 13 | new_name="jti", 14 | ), 15 | ] 16 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0007_auto_20171017_2214.py: -------------------------------------------------------------------------------- 1 | import django.db.models.deletion 2 | from django.conf import settings 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("token_blacklist", "0006_auto_20171017_2113"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="outstandingtoken", 14 | name="created_at", 15 | field=models.DateTimeField(blank=True, null=True), 16 | ), 17 | migrations.AlterField( 18 | model_name="outstandingtoken", 19 | name="user", 20 | field=models.ForeignKey( 21 | blank=True, 22 | null=True, 23 | on_delete=django.db.models.deletion.CASCADE, 24 | to=settings.AUTH_USER_MODEL, 25 | ), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0008_migrate_to_bigautofield.py: -------------------------------------------------------------------------------- 1 | from django.db import migrations, models 2 | 3 | 4 | class Migration(migrations.Migration): 5 | dependencies = [ 6 | ("token_blacklist", "0007_auto_20171017_2214"), 7 | ] 8 | 9 | operations = [ 10 | migrations.AlterField( 11 | model_name="blacklistedtoken", 12 | name="id", 13 | field=models.BigAutoField( 14 | auto_created=True, primary_key=True, serialize=False, verbose_name="ID" 15 | ), 16 | ), 17 | migrations.AlterField( 18 | model_name="outstandingtoken", 19 | name="id", 20 | field=models.BigAutoField( 21 | auto_created=True, primary_key=True, serialize=False, verbose_name="ID" 22 | ), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0010_fix_migrate_to_bigautofield.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.3 on 2021-05-27 17:46 2 | 3 | from pathlib import Path 4 | 5 | from django.db import migrations, models 6 | 7 | parent_dir = Path(__file__).resolve(strict=True).parent 8 | 9 | 10 | class Migration(migrations.Migration): 11 | dependencies = [ 12 | ("token_blacklist", "0008_migrate_to_bigautofield"), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name="blacklistedtoken", 18 | name="id", 19 | field=models.BigAutoField(primary_key=True, serialize=False), 20 | ), 21 | migrations.AlterField( 22 | model_name="outstandingtoken", 23 | name="id", 24 | field=models.BigAutoField(primary_key=True, serialize=False), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0011_linearizes_history.py: -------------------------------------------------------------------------------- 1 | import fnmatch 2 | import os 3 | from pathlib import Path 4 | 5 | from django.db import migrations, models # noqa F401 6 | 7 | parent_dir = Path(__file__).resolve(strict=True).parent 8 | 9 | 10 | class Migration(migrations.Migration): 11 | def __init__(self, *args, **kwargs): 12 | super().__init__(*args, **kwargs) 13 | self.dependencies = [("token_blacklist", "0010_fix_migrate_to_bigautofield")] 14 | _m = sorted(fnmatch.filter(os.listdir(parent_dir), "000*.py")) 15 | if len(_m) == 9: 16 | self.dependencies.insert(0, ("token_blacklist", os.path.splitext(_m[8])[0])) 17 | 18 | operations = [] 19 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0012_alter_outstandingtoken_user.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.10 on 2022-01-24 06:42 2 | 3 | import django.db.models.deletion 4 | from django.conf import settings 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 11 | ("token_blacklist", "0011_linearizes_history"), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name="outstandingtoken", 17 | name="user", 18 | field=models.ForeignKey( 19 | blank=True, 20 | null=True, 21 | on_delete=django.db.models.deletion.SET_NULL, 22 | to=settings.AUTH_USER_MODEL, 23 | ), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/0013_alter_blacklistedtoken_options_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.7 on 2025-03-23 06:56 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("token_blacklist", "0012_alter_outstandingtoken_user"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterModelOptions( 13 | name="blacklistedtoken", 14 | options={ 15 | "verbose_name": "Blacklisted Token", 16 | "verbose_name_plural": "Blacklisted Tokens", 17 | }, 18 | ), 19 | migrations.AlterModelOptions( 20 | name="outstandingtoken", 21 | options={ 22 | "ordering": ("user",), 23 | "verbose_name": "Outstanding Token", 24 | "verbose_name_plural": "Outstanding Tokens", 25 | }, 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/rest_framework_simplejwt/token_blacklist/migrations/__init__.py -------------------------------------------------------------------------------- /rest_framework_simplejwt/token_blacklist/models.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.db import models 3 | from django.utils.translation import gettext_lazy as _ 4 | 5 | 6 | class OutstandingToken(models.Model): 7 | id = models.BigAutoField(primary_key=True, serialize=False) 8 | user = models.ForeignKey( 9 | settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True, blank=True 10 | ) 11 | 12 | jti = models.CharField(unique=True, max_length=255) 13 | token = models.TextField() 14 | 15 | created_at = models.DateTimeField(null=True, blank=True) 16 | expires_at = models.DateTimeField() 17 | 18 | class Meta: 19 | verbose_name = _("Outstanding Token") 20 | verbose_name_plural = _("Outstanding Tokens") 21 | # Work around for a bug in Django: 22 | # https://code.djangoproject.com/ticket/19422 23 | # 24 | # Also see corresponding ticket: 25 | # https://github.com/encode/django-rest-framework/issues/705 26 | abstract = ( 27 | "rest_framework_simplejwt.token_blacklist" not in settings.INSTALLED_APPS 28 | ) 29 | ordering = ("user",) 30 | 31 | def __str__(self) -> str: 32 | return _("Token for %(user)s (%(jti)s)") % { 33 | "user": self.user, 34 | "jti": self.jti, 35 | } 36 | 37 | 38 | class BlacklistedToken(models.Model): 39 | id = models.BigAutoField(primary_key=True, serialize=False) 40 | token = models.OneToOneField(OutstandingToken, on_delete=models.CASCADE) 41 | 42 | blacklisted_at = models.DateTimeField(auto_now_add=True) 43 | 44 | class Meta: 45 | verbose_name = _("Blacklisted Token") 46 | verbose_name_plural = _("Blacklisted Tokens") 47 | # Work around for a bug in Django: 48 | # https://code.djangoproject.com/ticket/19422 49 | # 50 | # Also see corresponding ticket: 51 | # https://github.com/encode/django-rest-framework/issues/705 52 | abstract = ( 53 | "rest_framework_simplejwt.token_blacklist" not in settings.INSTALLED_APPS 54 | ) 55 | 56 | def __str__(self) -> str: 57 | return _("Blacklisted token for %(user)s") % {"user": self.token.user} 58 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/utils.py: -------------------------------------------------------------------------------- 1 | import hashlib 2 | import logging 3 | from calendar import timegm 4 | from datetime import datetime, timezone 5 | from typing import Callable 6 | 7 | from django.conf import settings 8 | from django.utils.functional import lazy 9 | 10 | 11 | def get_md5_hash_password(password: str) -> str: 12 | """ 13 | Returns MD5 hash of the given password 14 | """ 15 | return hashlib.md5(password.encode()).hexdigest().upper() 16 | 17 | 18 | def make_utc(dt: datetime) -> datetime: 19 | if settings.USE_TZ and dt.tzinfo is None: 20 | return dt.replace(tzinfo=timezone.utc) 21 | 22 | return dt 23 | 24 | 25 | def aware_utcnow() -> datetime: 26 | dt = datetime.now(tz=timezone.utc) 27 | if not settings.USE_TZ: 28 | dt = dt.replace(tzinfo=None) 29 | 30 | return dt 31 | 32 | 33 | def datetime_to_epoch(dt: datetime) -> int: 34 | return timegm(dt.utctimetuple()) 35 | 36 | 37 | def datetime_from_epoch(ts: float) -> datetime: 38 | dt = datetime.fromtimestamp(ts, tz=timezone.utc) 39 | if not settings.USE_TZ: 40 | dt = dt.replace(tzinfo=None) 41 | 42 | return dt 43 | 44 | 45 | def format_lazy(s: str, *args, **kwargs) -> str: 46 | return s.format(*args, **kwargs) 47 | 48 | 49 | format_lazy: Callable = lazy(format_lazy, str) 50 | 51 | logger = logging.getLogger("rest_framework_simplejwt") 52 | -------------------------------------------------------------------------------- /rest_framework_simplejwt/views.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | from django.utils.module_loading import import_string 4 | from rest_framework import generics, status 5 | from rest_framework.request import Request 6 | from rest_framework.response import Response 7 | from rest_framework.serializers import BaseSerializer 8 | 9 | from .authentication import AUTH_HEADER_TYPES 10 | from .exceptions import InvalidToken, TokenError 11 | from .settings import api_settings 12 | 13 | 14 | class TokenViewBase(generics.GenericAPIView): 15 | permission_classes = () 16 | authentication_classes = () 17 | 18 | serializer_class: Optional[type[BaseSerializer]] = None 19 | _serializer_class = "" 20 | 21 | www_authenticate_realm = "api" 22 | 23 | def get_serializer_class(self) -> type[BaseSerializer]: 24 | """ 25 | If serializer_class is set, use it directly. Otherwise get the class from settings. 26 | """ 27 | 28 | if self.serializer_class: 29 | return self.serializer_class 30 | try: 31 | return import_string(self._serializer_class) 32 | except ImportError as e: 33 | msg = f"Could not import serializer '{self._serializer_class}'" 34 | raise ImportError(msg) from e 35 | 36 | def get_authenticate_header(self, request: Request) -> str: 37 | return '{} realm="{}"'.format( 38 | AUTH_HEADER_TYPES[0], 39 | self.www_authenticate_realm, 40 | ) 41 | 42 | def post(self, request: Request, *args, **kwargs) -> Response: 43 | serializer = self.get_serializer(data=request.data) 44 | 45 | try: 46 | serializer.is_valid(raise_exception=True) 47 | except TokenError as e: 48 | raise InvalidToken(e.args[0]) from e 49 | 50 | return Response(serializer.validated_data, status=status.HTTP_200_OK) 51 | 52 | 53 | class TokenObtainPairView(TokenViewBase): 54 | """ 55 | Takes a set of user credentials and returns an access and refresh JSON web 56 | token pair to prove the authentication of those credentials. 57 | """ 58 | 59 | _serializer_class = api_settings.TOKEN_OBTAIN_SERIALIZER 60 | 61 | 62 | token_obtain_pair = TokenObtainPairView.as_view() 63 | 64 | 65 | class TokenRefreshView(TokenViewBase): 66 | """ 67 | Takes a refresh type JSON web token and returns an access type JSON web 68 | token if the refresh token is valid. 69 | """ 70 | 71 | _serializer_class = api_settings.TOKEN_REFRESH_SERIALIZER 72 | 73 | 74 | token_refresh = TokenRefreshView.as_view() 75 | 76 | 77 | class TokenObtainSlidingView(TokenViewBase): 78 | """ 79 | Takes a set of user credentials and returns a sliding JSON web token to 80 | prove the authentication of those credentials. 81 | """ 82 | 83 | _serializer_class = api_settings.SLIDING_TOKEN_OBTAIN_SERIALIZER 84 | 85 | 86 | token_obtain_sliding = TokenObtainSlidingView.as_view() 87 | 88 | 89 | class TokenRefreshSlidingView(TokenViewBase): 90 | """ 91 | Takes a sliding JSON web token and returns a new, refreshed version if the 92 | token's refresh period has not expired. 93 | """ 94 | 95 | _serializer_class = api_settings.SLIDING_TOKEN_REFRESH_SERIALIZER 96 | 97 | 98 | token_refresh_sliding = TokenRefreshSlidingView.as_view() 99 | 100 | 101 | class TokenVerifyView(TokenViewBase): 102 | """ 103 | Takes a token and indicates if it is valid. This view provides no 104 | information about a token's fitness for a particular use. 105 | """ 106 | 107 | _serializer_class = api_settings.TOKEN_VERIFY_SERIALIZER 108 | 109 | 110 | token_verify = TokenVerifyView.as_view() 111 | 112 | 113 | class TokenBlacklistView(TokenViewBase): 114 | """ 115 | Takes a token and blacklists it. Must be used with the 116 | `rest_framework_simplejwt.token_blacklist` app installed. 117 | """ 118 | 119 | _serializer_class = api_settings.TOKEN_BLACKLIST_SERIALIZER 120 | 121 | 122 | token_blacklist = TokenBlacklistView.as_view() 123 | -------------------------------------------------------------------------------- /scripts/i18n_updater.py: -------------------------------------------------------------------------------- 1 | import contextlib 2 | import os 3 | import subprocess 4 | 5 | 6 | def get_list_of_files(dir_name: str, extension: str): 7 | file_list = os.listdir(dir_name) 8 | 9 | result = [] 10 | for entry in file_list: 11 | full_path = os.path.join(dir_name, entry) 12 | if os.path.isdir(full_path): 13 | result = result + get_list_of_files(full_path, extension) 14 | else: 15 | if entry[-len(extension) : len(entry)] == extension: 16 | result.append(full_path) 17 | 18 | return result 19 | 20 | 21 | @contextlib.contextmanager 22 | def cache_creation(): 23 | # DO NOT cache the line number; the file may change 24 | cache: dict[str, str] = {} 25 | for file in get_list_of_files("./", ".po"): 26 | if os.path.isdir(file): 27 | continue 28 | 29 | with open(file) as f: 30 | for line in f.readlines(): 31 | if line.startswith('"POT-Creation-Date: '): 32 | cache[file] = line 33 | break 34 | yield 35 | for file, line_cache in cache.items(): 36 | with open(file, "r+") as f: 37 | lines = f.readlines() 38 | # clear file 39 | f.seek(0) 40 | f.truncate() 41 | 42 | # find line 43 | index = [ 44 | lines.index(x) for x in lines if x.startswith('"POT-Creation-Date: ') 45 | ][0] 46 | 47 | lines[index] = line_cache 48 | f.writelines(lines) 49 | 50 | 51 | def main(): 52 | with cache_creation(): 53 | subprocess.run(["django-admin", "makemessages", "-a"]) 54 | subprocess.run(["django-admin", "compilemessages"]) 55 | 56 | 57 | if __name__ == "__main__": 58 | main() 59 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | license_file = LICENSE.txt 3 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from pathlib import Path 3 | 4 | from setuptools import find_packages, setup 5 | 6 | extras_require = { 7 | "test": [ 8 | "cryptography", 9 | "freezegun", 10 | "pytest-cov", 11 | "pytest-django", 12 | "pytest-xdist", 13 | "pytest", 14 | "tox", 15 | ], 16 | "lint": [ 17 | "ruff", 18 | "yesqa", 19 | "pyupgrade", 20 | "pre-commit", 21 | ], 22 | "doc": [ 23 | "Sphinx", 24 | "sphinx_rtd_theme>=0.1.9", 25 | ], 26 | "dev": [ 27 | "pytest-watch", 28 | "wheel", 29 | "twine", 30 | "ipython", 31 | ], 32 | "python-jose": [ 33 | "python-jose==3.3.0", 34 | ], 35 | "crypto": [ 36 | "cryptography>=3.3.1", 37 | ], 38 | } 39 | 40 | extras_require["dev"] = ( 41 | extras_require["dev"] 42 | + extras_require["test"] 43 | + extras_require["lint"] 44 | + extras_require["doc"] 45 | + extras_require["python-jose"] 46 | ) 47 | 48 | 49 | setup( 50 | name="djangorestframework_simplejwt", 51 | use_scm_version={"version_scheme": "post-release"}, 52 | setup_requires=["setuptools_scm"], 53 | url="https://github.com/jazzband/djangorestframework-simplejwt", 54 | license="MIT", 55 | description="A minimal JSON Web Token authentication plugin for Django REST Framework", 56 | long_description=Path("README.rst").read_text(encoding="utf-8"), 57 | author="David Sanders", 58 | author_email="davesque@gmail.com", 59 | install_requires=[ 60 | "django>=4.2", 61 | "djangorestframework>=3.14", 62 | "pyjwt>=1.7.1,<2.10.0", 63 | ], 64 | python_requires=">=3.9", 65 | extras_require=extras_require, 66 | packages=find_packages(exclude=["tests", "tests.*", "licenses", "requirements"]), 67 | include_package_data=True, 68 | zip_safe=False, 69 | classifiers=[ 70 | "Development Status :: 5 - Production/Stable", 71 | "Environment :: Web Environment", 72 | "Framework :: Django", 73 | "Framework :: Django :: 4.2", 74 | "Framework :: Django :: 5.0", 75 | "Framework :: Django :: 5.1", 76 | "Framework :: Django :: 5.2", 77 | "Intended Audience :: Developers", 78 | "License :: OSI Approved :: MIT License", 79 | "Operating System :: OS Independent", 80 | "Programming Language :: Python", 81 | "Programming Language :: Python :: 3", 82 | "Programming Language :: Python :: 3.9", 83 | "Programming Language :: Python :: 3.10", 84 | "Programming Language :: Python :: 3.11", 85 | "Programming Language :: Python :: 3.12", 86 | "Programming Language :: Python :: 3.13", 87 | "Topic :: Internet :: WWW/HTTP", 88 | ], 89 | ) 90 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jazzband/djangorestframework-simplejwt/890e13691f919e4088f47000c853ffd0bcb64c76/tests/__init__.py -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | def pytest_configure(): 2 | from django.conf import settings 3 | 4 | MIDDLEWARE = ( 5 | "django.middleware.common.CommonMiddleware", 6 | "django.contrib.sessions.middleware.SessionMiddleware", 7 | "django.contrib.auth.middleware.AuthenticationMiddleware", 8 | "django.contrib.messages.middleware.MessageMiddleware", 9 | ) 10 | 11 | settings.configure( 12 | DEBUG_PROPAGATE_EXCEPTIONS=True, 13 | DATABASES={ 14 | "default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}, 15 | "other": {"ENGINE": "django.db.backends.sqlite3", "NAME": "other"}, 16 | }, 17 | SITE_ID=1, 18 | SECRET_KEY="not very secret in tests", 19 | USE_I18N=True, 20 | STATIC_URL="/static/", 21 | ROOT_URLCONF="tests.urls", 22 | TEMPLATES=[ 23 | { 24 | "BACKEND": "django.template.backends.django.DjangoTemplates", 25 | "APP_DIRS": True, 26 | }, 27 | ], 28 | MIDDLEWARE=MIDDLEWARE, 29 | MIDDLEWARE_CLASSES=MIDDLEWARE, 30 | INSTALLED_APPS=( 31 | "django.contrib.auth", 32 | "django.contrib.contenttypes", 33 | "django.contrib.sessions", 34 | "django.contrib.sites", 35 | "django.contrib.staticfiles", 36 | "rest_framework", 37 | "rest_framework_simplejwt", 38 | "rest_framework_simplejwt.token_blacklist", 39 | "tests", 40 | ), 41 | PASSWORD_HASHERS=("django.contrib.auth.hashers.MD5PasswordHasher",), 42 | SIMPLE_JWT={ 43 | "BLACKLIST_AFTER_ROTATION": True, 44 | }, 45 | ) 46 | 47 | try: 48 | import django 49 | 50 | django.setup() 51 | except AttributeError: 52 | pass 53 | -------------------------------------------------------------------------------- /tests/models.py: -------------------------------------------------------------------------------- 1 | # Add models here 2 | -------------------------------------------------------------------------------- /tests/test_init.py: -------------------------------------------------------------------------------- 1 | from importlib import reload 2 | from importlib.metadata import PackageNotFoundError 3 | from unittest.mock import Mock, patch 4 | 5 | from django.test import SimpleTestCase 6 | 7 | 8 | class TestInit(SimpleTestCase): 9 | def test_package_is_not_installed(self): 10 | with patch( 11 | "importlib.metadata.version", Mock(side_effect=PackageNotFoundError) 12 | ): 13 | import rest_framework_simplejwt.__init__ 14 | 15 | self.assertEqual(rest_framework_simplejwt.__init__.__version__, None) 16 | 17 | # Restore origin package without mock 18 | reload(rest_framework_simplejwt.__init__) 19 | -------------------------------------------------------------------------------- /tests/test_integration.py: -------------------------------------------------------------------------------- 1 | from datetime import timedelta 2 | 3 | from django.contrib.auth import get_user_model 4 | from django.urls import reverse 5 | from rest_framework.status import HTTP_200_OK, HTTP_401_UNAUTHORIZED 6 | 7 | from rest_framework_simplejwt.settings import api_settings 8 | from rest_framework_simplejwt.tokens import AccessToken 9 | 10 | from .utils import APIViewTestCase, override_api_settings 11 | 12 | User = get_user_model() 13 | 14 | 15 | class TestTestView(APIViewTestCase): 16 | view_name = "test_view" 17 | 18 | def setUp(self): 19 | self.username = "test_user" 20 | self.password = "test_password" 21 | 22 | self.user = User.objects.create_user( 23 | username=self.username, 24 | password=self.password, 25 | ) 26 | 27 | def test_no_authorization(self): 28 | res = self.view_get() 29 | 30 | self.assertEqual(res.status_code, HTTP_401_UNAUTHORIZED) 31 | self.assertIn("credentials were not provided", res.data["detail"]) 32 | 33 | def test_wrong_auth_type(self): 34 | res = self.client.post( 35 | reverse("token_obtain_sliding"), 36 | data={ 37 | User.USERNAME_FIELD: self.username, 38 | "password": self.password, 39 | }, 40 | ) 41 | 42 | token = res.data["token"] 43 | self.authenticate_with_token("Wrong", token) 44 | 45 | res = self.view_get() 46 | 47 | self.assertEqual(res.status_code, HTTP_401_UNAUTHORIZED) 48 | self.assertIn("credentials were not provided", res.data["detail"]) 49 | 50 | @override_api_settings( 51 | AUTH_TOKEN_CLASSES=("rest_framework_simplejwt.tokens.AccessToken",), 52 | ) 53 | def test_expired_token(self): 54 | old_lifetime = AccessToken.lifetime 55 | AccessToken.lifetime = timedelta(seconds=0) 56 | try: 57 | res = self.client.post( 58 | reverse("token_obtain_pair"), 59 | data={ 60 | User.USERNAME_FIELD: self.username, 61 | "password": self.password, 62 | }, 63 | ) 64 | finally: 65 | AccessToken.lifetime = old_lifetime 66 | 67 | access = res.data["access"] 68 | self.authenticate_with_token(api_settings.AUTH_HEADER_TYPES[0], access) 69 | 70 | res = self.view_get() 71 | 72 | self.assertEqual(res.status_code, HTTP_401_UNAUTHORIZED) 73 | self.assertEqual("token_not_valid", res.data["code"]) 74 | 75 | @override_api_settings( 76 | AUTH_TOKEN_CLASSES=("rest_framework_simplejwt.tokens.SlidingToken",), 77 | ) 78 | def test_user_can_get_sliding_token_and_use_it(self): 79 | res = self.client.post( 80 | reverse("token_obtain_sliding"), 81 | data={ 82 | User.USERNAME_FIELD: self.username, 83 | "password": self.password, 84 | }, 85 | ) 86 | 87 | token = res.data["token"] 88 | self.authenticate_with_token(api_settings.AUTH_HEADER_TYPES[0], token) 89 | 90 | res = self.view_get() 91 | 92 | self.assertEqual(res.status_code, HTTP_200_OK) 93 | self.assertEqual(res.data["foo"], "bar") 94 | 95 | @override_api_settings( 96 | AUTH_TOKEN_CLASSES=("rest_framework_simplejwt.tokens.AccessToken",), 97 | ) 98 | def test_user_can_get_access_and_refresh_tokens_and_use_them(self): 99 | res = self.client.post( 100 | reverse("token_obtain_pair"), 101 | data={ 102 | User.USERNAME_FIELD: self.username, 103 | "password": self.password, 104 | }, 105 | ) 106 | 107 | access = res.data["access"] 108 | refresh = res.data["refresh"] 109 | 110 | self.authenticate_with_token(api_settings.AUTH_HEADER_TYPES[0], access) 111 | 112 | res = self.view_get() 113 | 114 | self.assertEqual(res.status_code, HTTP_200_OK) 115 | self.assertEqual(res.data["foo"], "bar") 116 | 117 | res = self.client.post( 118 | reverse("token_refresh"), 119 | data={"refresh": refresh}, 120 | ) 121 | 122 | access = res.data["access"] 123 | 124 | self.authenticate_with_token(api_settings.AUTH_HEADER_TYPES[0], access) 125 | 126 | res = self.view_get() 127 | 128 | self.assertEqual(res.status_code, HTTP_200_OK) 129 | self.assertEqual(res.data["foo"], "bar") 130 | -------------------------------------------------------------------------------- /tests/test_migrations.py: -------------------------------------------------------------------------------- 1 | from io import StringIO 2 | from typing import Optional 3 | 4 | import pytest 5 | from django.core.management import call_command 6 | from django.test import TestCase 7 | 8 | 9 | class MigrationTestCase(TestCase): 10 | def test_no_missing_migrations(self): 11 | """ 12 | Ensures all model changes are reflected in migrations. 13 | If this test fails, there are model changes that require a new migration. 14 | 15 | Behavior: 16 | - Passes silently if no migrations are required 17 | - Fails with a detailed message if migrations are need 18 | """ 19 | 20 | output = StringIO() 21 | 22 | # Initialize exception variable to track migration check result 23 | exec: Optional[SystemExit] = None 24 | 25 | try: 26 | # Check for pending migrations without actually creating them 27 | call_command( 28 | "makemigrations", "--check", "--dry-run", stdout=output, stderr=output 29 | ) 30 | except SystemExit as e: 31 | # Capture the SystemExit if migrations are needed (the command will had ended with exit code 1) 32 | exec = e 33 | 34 | # If an exception was raised, verify it indicates no migration changes are required 35 | if exec is not None: 36 | self.assertEqual( 37 | exec.code, 38 | 0, # 0 means no migrations needed 39 | f"Model changes detected that require migrations!\n" 40 | f"Please run `python manage.py makemigrations` to create the necessary migrations.\n\n" 41 | f"Detected Changes:\n{output.getvalue()}", 42 | ) 43 | -------------------------------------------------------------------------------- /tests/test_models.py: -------------------------------------------------------------------------------- 1 | from importlib import reload 2 | from unittest.mock import patch 3 | 4 | from django.test import TestCase 5 | 6 | from rest_framework_simplejwt.models import TokenUser 7 | from rest_framework_simplejwt.settings import api_settings 8 | 9 | AuthToken = api_settings.AUTH_TOKEN_CLASSES[0] 10 | 11 | 12 | class TestTokenUser(TestCase): 13 | def setUp(self): 14 | self.token = AuthToken() 15 | self.token[api_settings.USER_ID_CLAIM] = 42 16 | self.token["username"] = "deep-thought" 17 | self.token["some_other_stuff"] = "arstarst" 18 | 19 | self.user = TokenUser(self.token) 20 | 21 | def test_type_checking(self): 22 | from rest_framework_simplejwt import models 23 | 24 | with patch("typing.TYPE_CHECKING", True): 25 | # Reload models, mock type checking 26 | reload(models) 27 | 28 | self.assertEqual(models.TYPE_CHECKING, True) 29 | 30 | # Restore origin module without mock 31 | reload(models) 32 | 33 | def test_username(self): 34 | self.assertEqual(self.user.username, "deep-thought") 35 | 36 | def test_is_active(self): 37 | self.assertTrue(self.user.is_active) 38 | 39 | def test_str(self): 40 | self.assertEqual(str(self.user), "TokenUser 42") 41 | 42 | def test_id(self): 43 | self.assertEqual(self.user.id, 42) 44 | 45 | def test_pk(self): 46 | self.assertEqual(self.user.pk, 42) 47 | 48 | def test_is_staff(self): 49 | payload = {api_settings.USER_ID_CLAIM: 42} 50 | user = TokenUser(payload) 51 | 52 | self.assertFalse(user.is_staff) 53 | 54 | payload["is_staff"] = True 55 | user = TokenUser(payload) 56 | 57 | self.assertTrue(user.is_staff) 58 | 59 | def test_is_superuser(self): 60 | payload = {api_settings.USER_ID_CLAIM: 42} 61 | user = TokenUser(payload) 62 | 63 | self.assertFalse(user.is_superuser) 64 | 65 | payload["is_superuser"] = True 66 | user = TokenUser(payload) 67 | 68 | self.assertTrue(user.is_superuser) 69 | 70 | def test_eq(self): 71 | user1 = TokenUser({api_settings.USER_ID_CLAIM: 1}) 72 | user2 = TokenUser({api_settings.USER_ID_CLAIM: 2}) 73 | user3 = TokenUser({api_settings.USER_ID_CLAIM: 1}) 74 | 75 | self.assertNotEqual(user1, user2) 76 | self.assertEqual(user1, user3) 77 | 78 | def test_eq_not_implemented(self): 79 | user1 = TokenUser({api_settings.USER_ID_CLAIM: 1}) 80 | user2 = "user2" 81 | 82 | self.assertFalse(user1 == user2) 83 | 84 | def test_hash(self): 85 | self.assertEqual(hash(self.user), hash(self.user.id)) 86 | 87 | def test_not_implemented(self): 88 | with self.assertRaises(NotImplementedError): 89 | self.user.save() 90 | 91 | with self.assertRaises(NotImplementedError): 92 | self.user.delete() 93 | 94 | with self.assertRaises(NotImplementedError): 95 | self.user.set_password("arst") 96 | 97 | with self.assertRaises(NotImplementedError): 98 | self.user.check_password("arst") 99 | 100 | def test_groups(self): 101 | self.assertFalse(self.user.groups.exists()) 102 | 103 | def test_user_permissions(self): 104 | self.assertFalse(self.user.user_permissions.exists()) 105 | 106 | def test_get_group_permissions(self): 107 | self.assertEqual(len(self.user.get_group_permissions()), 0) 108 | 109 | def test_get_all_permissions(self): 110 | self.assertEqual(len(self.user.get_all_permissions()), 0) 111 | 112 | def test_has_perm(self): 113 | self.assertFalse(self.user.has_perm("test_perm")) 114 | 115 | def test_has_perms(self): 116 | self.assertFalse(self.user.has_perms(["test_perm"])) 117 | 118 | def test_has_module_perms(self): 119 | self.assertFalse(self.user.has_module_perms("test_module")) 120 | 121 | def test_is_anonymous(self): 122 | self.assertFalse(self.user.is_anonymous) 123 | 124 | def test_is_authenticated(self): 125 | self.assertTrue(self.user.is_authenticated) 126 | 127 | def test_get_username(self): 128 | self.assertEqual(self.user.get_username(), "deep-thought") 129 | 130 | def test_get_custom_claims_through_backup_getattr(self): 131 | self.assertEqual(self.user.some_other_stuff, "arstarst") 132 | -------------------------------------------------------------------------------- /tests/test_utils.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime, timedelta, timezone 2 | 3 | from django.test import TestCase 4 | from freezegun import freeze_time 5 | 6 | from rest_framework_simplejwt.utils import ( 7 | aware_utcnow, 8 | datetime_from_epoch, 9 | datetime_to_epoch, 10 | format_lazy, 11 | make_utc, 12 | ) 13 | 14 | 15 | class TestMakeUtc(TestCase): 16 | def test_it_should_return_the_correct_values(self): 17 | # It should make a naive datetime into an aware, utc datetime if django 18 | # is configured to use timezones and the datetime doesn't already have 19 | # a timezone 20 | 21 | # Naive datetime 22 | dt = datetime(year=1970, month=12, day=1) 23 | 24 | with self.settings(USE_TZ=False): 25 | dt = make_utc(dt) 26 | self.assertTrue(dt.tzinfo is None) 27 | 28 | with self.settings(USE_TZ=True): 29 | dt = make_utc(dt) 30 | self.assertTrue(dt.tzinfo is not None) 31 | self.assertEqual(dt.utcoffset(), timedelta(seconds=0)) 32 | 33 | 34 | class TestAwareUtcnow(TestCase): 35 | def test_it_should_return_the_correct_value(self): 36 | now = datetime.now(tz=timezone.utc).replace(tzinfo=None) 37 | 38 | with freeze_time(now): 39 | # Should return aware utcnow if USE_TZ == True 40 | with self.settings(USE_TZ=True): 41 | self.assertEqual(now.replace(tzinfo=timezone.utc), aware_utcnow()) 42 | 43 | # Should return naive utcnow if USE_TZ == False 44 | with self.settings(USE_TZ=False): 45 | self.assertEqual(now, aware_utcnow()) 46 | 47 | 48 | class TestDatetimeToEpoch(TestCase): 49 | def test_it_should_return_the_correct_values(self): 50 | self.assertEqual(datetime_to_epoch(datetime(year=1970, month=1, day=1)), 0) 51 | self.assertEqual( 52 | datetime_to_epoch(datetime(year=1970, month=1, day=1, second=1)), 1 53 | ) 54 | self.assertEqual( 55 | datetime_to_epoch(datetime(year=2000, month=1, day=1)), 946684800 56 | ) 57 | 58 | 59 | class TestDatetimeFromEpoch(TestCase): 60 | def test_it_should_return_the_correct_values(self): 61 | with self.settings(USE_TZ=False): 62 | self.assertEqual( 63 | datetime_from_epoch(0), datetime(year=1970, month=1, day=1) 64 | ) 65 | self.assertEqual( 66 | datetime_from_epoch(1), datetime(year=1970, month=1, day=1, second=1) 67 | ) 68 | self.assertEqual( 69 | datetime_from_epoch(946684800), 70 | datetime(year=2000, month=1, day=1), 71 | 946684800, 72 | ) 73 | 74 | with self.settings(USE_TZ=True): 75 | self.assertEqual( 76 | datetime_from_epoch(0), make_utc(datetime(year=1970, month=1, day=1)) 77 | ) 78 | self.assertEqual( 79 | datetime_from_epoch(1), 80 | make_utc(datetime(year=1970, month=1, day=1, second=1)), 81 | ) 82 | self.assertEqual( 83 | datetime_from_epoch(946684800), 84 | make_utc(datetime(year=2000, month=1, day=1)), 85 | ) 86 | 87 | 88 | class TestFormatLazy(TestCase): 89 | def test_it_should_work(self): 90 | obj = format_lazy("{} {}", "arst", "zxcv") 91 | 92 | self.assertNotIsInstance(obj, str) 93 | self.assertEqual(str(obj), "arst zxcv") 94 | -------------------------------------------------------------------------------- /tests/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import re_path 2 | 3 | from rest_framework_simplejwt import views as jwt_views 4 | 5 | from . import views 6 | 7 | urlpatterns = [ 8 | re_path(r"^token/pair/$", jwt_views.token_obtain_pair, name="token_obtain_pair"), 9 | re_path(r"^token/refresh/$", jwt_views.token_refresh, name="token_refresh"), 10 | re_path( 11 | r"^token/sliding/$", jwt_views.token_obtain_sliding, name="token_obtain_sliding" 12 | ), 13 | re_path( 14 | r"^token/sliding/refresh/$", 15 | jwt_views.token_refresh_sliding, 16 | name="token_refresh_sliding", 17 | ), 18 | re_path(r"^token/verify/$", jwt_views.token_verify, name="token_verify"), 19 | re_path(r"^token/blacklist/$", jwt_views.token_blacklist, name="token_blacklist"), 20 | re_path(r"^test-view/$", views.test_view, name="test_view"), 21 | ] 22 | -------------------------------------------------------------------------------- /tests/utils.py: -------------------------------------------------------------------------------- 1 | import contextlib 2 | 3 | from django.db import connection 4 | from django.db.migrations.executor import MigrationExecutor 5 | from django.test import TestCase, TransactionTestCase 6 | from django.urls import reverse 7 | from rest_framework.test import APIClient 8 | 9 | from rest_framework_simplejwt.settings import api_settings 10 | 11 | 12 | def client_action_wrapper(action): 13 | def wrapper_method(self, *args, **kwargs): 14 | if self.view_name is None: 15 | raise ValueError("Must give value for `view_name` property") 16 | 17 | reverse_args = kwargs.pop("reverse_args", tuple()) 18 | reverse_kwargs = kwargs.pop("reverse_kwargs", dict()) 19 | query_string = kwargs.pop("query_string", None) 20 | 21 | url = reverse(self.view_name, args=reverse_args, kwargs=reverse_kwargs) 22 | if query_string is not None: 23 | url = url + f"?{query_string}" 24 | 25 | return getattr(self.client, action)(url, *args, **kwargs) 26 | 27 | return wrapper_method 28 | 29 | 30 | class APIViewTestCase(TestCase): 31 | client_class = APIClient 32 | 33 | def authenticate_with_token(self, type, token): 34 | """ 35 | Authenticates requests with the given token. 36 | """ 37 | self.client.credentials(HTTP_AUTHORIZATION=f"{type} {token}") 38 | 39 | view_name = None 40 | 41 | view_post = client_action_wrapper("post") 42 | view_get = client_action_wrapper("get") 43 | 44 | 45 | @contextlib.contextmanager 46 | def override_api_settings(**settings): 47 | old_settings = {} 48 | 49 | for k, v in settings.items(): 50 | # Save settings 51 | try: 52 | old_settings[k] = api_settings.user_settings[k] 53 | except KeyError: 54 | pass 55 | 56 | # Install temporary settings 57 | api_settings.user_settings[k] = v 58 | 59 | # Delete any cached settings 60 | try: 61 | delattr(api_settings, k) 62 | except AttributeError: 63 | pass 64 | 65 | try: 66 | yield 67 | 68 | finally: 69 | for k in settings.keys(): 70 | # Delete temporary settings 71 | api_settings.user_settings.pop(k) 72 | 73 | # Restore saved settings 74 | try: 75 | api_settings.user_settings[k] = old_settings[k] 76 | except KeyError: 77 | pass 78 | 79 | # Delete any cached settings 80 | try: 81 | delattr(api_settings, k) 82 | except AttributeError: 83 | pass 84 | 85 | 86 | class MigrationTestCase(TransactionTestCase): 87 | migrate_from = None 88 | migrate_to = None 89 | 90 | def setUp(self): 91 | self.migrate_from = [self.migrate_from] 92 | self.migrate_to = [self.migrate_to] 93 | 94 | # Reverse to the original migration 95 | executor = MigrationExecutor(connection) 96 | executor.migrate(self.migrate_from) 97 | 98 | old_apps = executor.loader.project_state(self.migrate_from).apps 99 | self.setUpBeforeMigration(old_apps) 100 | 101 | # Run the migration to test 102 | executor.loader.build_graph() 103 | executor.migrate(self.migrate_to) 104 | 105 | self.apps = executor.loader.project_state(self.migrate_to).apps 106 | 107 | def setUpBeforeMigration(self, apps): 108 | pass 109 | -------------------------------------------------------------------------------- /tests/views.py: -------------------------------------------------------------------------------- 1 | from rest_framework import permissions 2 | from rest_framework.response import Response 3 | from rest_framework.views import APIView 4 | 5 | from rest_framework_simplejwt import authentication 6 | 7 | 8 | class TestView(APIView): 9 | permission_classes = (permissions.IsAuthenticated,) 10 | authentication_classes = (authentication.JWTAuthentication,) 11 | 12 | def get(self, request): 13 | return Response({"foo": "bar"}) 14 | 15 | 16 | test_view = TestView.as_view() 17 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist= 3 | py{39,310,311,312}-dj42-drf{314,315}-pyjwt{171,2}-tests 4 | py{310,311,312}-dj50-drf315-pyjwt{171,2}-tests 5 | py{310,311,312,313}-dj51-drf315-pyjwt{171,2}-tests 6 | py{311,312,313}-dj52-drf315-pyjwt{171,2}-tests 7 | docs 8 | 9 | [gh-actions] 10 | python= 11 | 3.9: py39 12 | 3.10: py310 13 | 3.11: py311 14 | 3.12: py312, docs 15 | 3.13: py313 16 | 17 | [gh-actions:env] 18 | DJANGO= 19 | 4.2: dj42 20 | 5.0: dj50 21 | 5.1: dj51 22 | 5.2: dj52 23 | DRF= 24 | 3.14: drf314 25 | 3.15: drf315 26 | 27 | [testenv] 28 | commands = pytest {posargs:tests} --cov-append --cov-report=xml --cov=rest_framework_simplejwt 29 | extras= 30 | test 31 | python-jose 32 | setenv= 33 | PYTHONDONTWRITEBYTECODE=1 34 | deps= 35 | dj42: Django>=4.2,<4.3 36 | dj50: Django>=5.0,<5.1 37 | dj51: Django>=5.1,<5.2 38 | dj52: Django>=5.2,<5.3 39 | drf314: djangorestframework>=3.14,<3.15 40 | drf315: djangorestframework>=3.15,<3.16 41 | pyjwt171: pyjwt>=1.7.1,<1.8 42 | pyjwt2: pyjwt>=2,<2.10.0 43 | allowlist_externals=make 44 | 45 | [testenv:docs] 46 | extras = doc 47 | commands = make build-docs 48 | --------------------------------------------------------------------------------