server.auth: register authentication utility
This commit is contained in:
parent
95ed826629
commit
74a3f9210b
3 changed files with 16 additions and 2 deletions
14
loops/server/auth.py
Normal file
14
loops/server/auth.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# loops.server.auth
|
||||
|
||||
# provide (register) authentication utility
|
||||
# and other authentication and authorization stuff.
|
||||
|
||||
from scopes.server import auth
|
||||
from zope.authentication.interfaces import IAuthentication
|
||||
from zope.component import getUtility, provideUtility
|
||||
|
||||
def registerAuthUtility():
|
||||
baseAuth = getUtility(IAuthentication)
|
||||
print('*** registerAuthUtility, baseAuth:', baseAuth)
|
||||
provideUtility(auth.JwtAuthentication(baseAuth))
|
||||
|
|
@ -9,7 +9,7 @@ import sys
|
|||
from zope.securitypolicy import securitymap
|
||||
sys.modules['zope.app.securitypolicy.securitymap'] = securitymap
|
||||
|
||||
from scopes.server import auth
|
||||
from loops.server import auth
|
||||
import waitress
|
||||
from zope.app.wsgi import config, getWSGIApplication
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
import atexit
|
||||
import os
|
||||
from scopes.server import auth
|
||||
from transaction import commit, abort
|
||||
from zope.app import wsgi
|
||||
from zope.app.authentication.principalfolder import Principal
|
||||
|
@ -32,6 +31,7 @@ from zope.security.management import getInteraction, newInteraction, endInteract
|
|||
from cybertools.util.date import date2TimeStamp, strptime
|
||||
from cybertools.util.jeep import Jeep
|
||||
from loops.common import adapted, baseObject
|
||||
from loops.server import auth
|
||||
from loops.util import getObjectForUid, getUidForObject, getCatalog, reindex
|
||||
|
||||
os.environ['NLS_LANG'] = 'German_Germany.UTF8'
|
||||
|
|
Loading…
Add table
Reference in a new issue