Add authentication services
issue11582 review417471003
This commit is contained in:
1 parent
8cbce1db85
commit
6ad744ff47
2 files changed
+15
No files matched your search
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user