SqlServer: support single sign on / Windows credential authentication
This is done through a new db-extra-arguments section in instance_dir/sources
which is passed as a string to the extra_args named argument of
lgc.db.get_connection. If this argument is Trusted_Connection, windows
authentication is used instead of login/password.
This change requires at least revision 5475ec3f6412 of logilab.common which
will be included in logilab-common 0.46. debian/control updated to mention this
new dependency.
"""
:organization: Logilab
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
"""
from cubicweb.server.hooksmanager import SystemHook
CALLED_EVENTS = {}
class StartupHook(SystemHook):
events = ('server_startup',)
def call(self, repo):
CALLED_EVENTS['server_startup'] = True
class ShutdownHook(SystemHook):
events = ('server_shutdown',)
def call(self, repo):
CALLED_EVENTS['server_shutdown'] = True
class LoginHook(SystemHook):
events = ('session_open',)
def call(self, session):
CALLED_EVENTS['session_open'] = session.user.login
class LogoutHook(SystemHook):
events = ('session_close',)
def call(self, session):
CALLED_EVENTS['session_close'] = session.user.login