sync vers la nouvelle auth

This commit is contained in:
fpeters 2004-01-04 18:46:49 +00:00
parent 76ba8f213b
commit 0b292d40cb
1 changed files with 5 additions and 8 deletions

View File

@ -82,13 +82,10 @@ def init(dispatcherId, login = 1):
config.readfp( open('%s/.glasnostrc' % os.environ['HOME']))
username = config.get(host, 'username')
password = config.get(host, 'password')
authenticationProxy = getProxyForServerRole('authentication')
authLPProxy = getProxyForServerRole('authentication-login-password')
authObject = authLPProxy.newAuthenticationObject()
authObject.login = username
authObject.password = password
userToken = authenticationProxy.getUserToken('login-password', authObject)
passwordAccountsProxy = getProxyForServerRole('passwordaccounts')
userToken, authenticationMethod = \
passwordAccountsProxy.checkObjectAuthentication(username, password)
context.setVar('userToken', userToken)
userId = authenticationProxy.getUserId()
context.setVar('userId', userId)
#userId = authenticationProxy.getUserId()
#context.setVar('userId', userId)