Metadata-Version: 2.5
Name: trytond_web_user_backend
Version: 8.0.1.1
Summary: Web User Backend Features
Author: Clemens Hupka
Maintainer-email: Clemens Hupka <clemens.hupka@backend.at>
License-Expression: GPL-3.0-or-later
License-File: COPYRIGHT
License-File: LICENSE
Keywords: backend,tryton,user,web
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: trytond-keycloak-auth<8.1,>=8.0
Requires-Dist: trytond-web-user<8.1,>=8.0
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Description-Content-Type: text/x-rst

web_user_backend
================

Backend features for the ``web_user`` module: a persistent language
preference for ``web.user`` records with HTTP routes for
authenticated web users to read and update their own preference.

The language routes accept two credentials (issue #808).  A
``web.user.session`` key issued by the ``web_user`` login system keeps
expressing the ``language`` of the ``web.user`` it resolved, and a
Keycloak/OIDC access token -- verified with ``keycloak_auth``, which
resolves an active ``res.user`` by exact ``login`` -- expresses the
``language`` of that ``res.user``, which has no ``web.user`` record.

Which path a request takes is decided by the shape of its credential: a
session key is a hexadecimal string and can never carry the dot of a
JSON Web Token, so a portal keeps using its session keys until it
migrates to Keycloak.  The adoption of the helper is documented in the
``keycloak_auth`` adoption guide and the route contract in
``doc/index.rst``.
