pas de création de session avant le formulaire de login

This commit is contained in:
fpeters 2004-04-09 21:42:04 +00:00
parent c9ca88b76e
commit c2719ec377
1 changed files with 6 additions and 15 deletions

View File

@ -523,20 +523,11 @@ class IdentitiesWeb(objects.ObjectsWebMixin, proxyIdentities.IdentitiesProxy):
authenticationRequest)
singleSignOnServiceUrl.isPublicForWeb = 1
def loginLocal(self, afterLoginUri = '', authMeth = ''):
def loginLocal(self, authMeth = ''):
"""Non Liberty Alliance local login."""
nextUri = X.roleUrl('identities', 'loginLocal')
nextUri.add('afterLoginUri', afterLoginUri)
redirectPage = self.createSessionIfNeeded(nextUri)
if redirectPage is not None:
return redirectPage
session = context.getVar('session')
session['afterLoginUri'] = afterLoginUri
session['isDirty'] = 1
authenticationMethods = ['password', 'softwarePki', 'token'] # FIXME
# FIXME: this should be dynamic
authenticationMethods = ['password', 'softwarePki', 'token']
accountsServerRoles = {
'password': 'passwordaccounts',
'softwarePki': 'x509accounts',
@ -544,7 +535,7 @@ class IdentitiesWeb(objects.ObjectsWebMixin, proxyIdentities.IdentitiesProxy):
}
if not authMeth or authMeth not in accountsServerRoles.keys():
authMeth = authenticationMethods[0]
accountsWeb = getWebForServerRole(accountsServerRoles[authMeth]) # FIXME
accountsWeb = getWebForServerRole(accountsServerRoles[authMeth])
if not accountsWeb:
if context.getVar('debug'):
raise 'accountsWeb is None'
@ -600,8 +591,8 @@ class IdentitiesWeb(objects.ObjectsWebMixin, proxyIdentities.IdentitiesProxy):
if not session.has_key('authenticationRequestKeywords'):
# Non Liberty Alliance local login.
if session.has_key('afterLoginUri') and session['afterLoginUri']:
nextUri = session['afterLoginUri']
if context.getVar('nextUri'):
nextUri = context.getVar('nextUri')
else:
nextUri = X.rootUrl()
if newSession and context.getVar('canUseCookie'):