diff --git a/CHANGELOG b/CHANGELOG index ebe61a3335..9aa2a71af4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 --git a/trytond/protocols/dispatcher.py b/trytond/protocols/dispatcher.py index 26388af366..d12dc1e7d5 100644 --- a/trytond/protocols/dispatcher.py +++ b/trytond/protocols/dispatcher.py @@ -26,6 +26,8 @@ from trytond.wsgi import app from .wrappers import with_pool +__all__ = ['register_authentication_service'] + logger = logging.getLogger(__name__) ir_configuration = Table('ir_configuration') @@ -83,6 +85,7 @@ def root(request, *args): 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 @@ def db_list(request, *args): 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):