sync vers la nouvelle auth
This commit is contained in:
parent
76ba8f213b
commit
0b292d40cb
|
@ -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)
|
||||
|
||||
|
|
Reference in New Issue