changeset 124b4c6031af in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=124b4c6031af
description:
Add authentication services
issue11582
review417471003
diffstat:
CHANGELOG | 1 +
trytond/protocols/dispatcher.py | 14 ++++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diffs (46 lines):
diff -r cf8d361600a6 -r 124b4c6031af CHANGELOG
--- a/CHANGELOG Sun Oct 09 14:06:18 2022 +0200
+++ b/CHANGELOG Sun Oct 09 18:33:16 2022 +0200
@@ -1,3 +1,4 @@
+* Add authentication services
* Schedule actions using server timezone
* Reset the user sessions less often
* Add straight values to wizard state view
diff -r cf8d361600a6 -r 124b4c6031af trytond/protocols/dispatcher.py
--- a/trytond/protocols/dispatcher.py Sun Oct 09 14:06:18 2022 +0200
+++ b/trytond/protocols/dispatcher.py Sun Oct 09 18:33:16 2022 +0200
@@ -26,6 +26,8 @@
from .wrappers import with_pool
+__all__ = ['register_authentication_service']
+
logger = logging.getLogger(__name__)
ir_configuration = Table('ir_configuration')
@@ -83,6 +85,7 @@
methods = {
'common.server.version': lambda *a: __version__,
'common.db.list': db_list,
+ 'common.authentication.services': authentication_services,
}
return methods[request.rpc_method](request, *request.rpc_params)
@@ -112,6 +115,17 @@
return transaction.database.list(hostname=hostname)
+def authentication_services(request):
+ return _AUTHENTICATION_SERVICES
+
+
+def register_authentication_service(name, url):
+ _AUTHENTICATION_SERVICES.append((name, url))
+
+
+_AUTHENTICATION_SERVICES = []
+
+
@app.auth_required
@with_pool
def list_method(request, pool):