class AuthenticateRequest(ProviderPageBase):
- def __init__(self, *args, **kwargs):
- super(AuthenticateRequest, self).__init__(*args, **kwargs)
+ def __init__(self, site, provider, *args, **kwargs):
+ super(AuthenticateRequest, self).__init__(site, provider)
self.stage = 'init'
self.trans = None
try:
# generate a new id or get current one
self.trans = Transaction('openid', **kwargs)
- if self.trans.cookie.value != self.trans.provider:
+ if (self.trans.cookie and
+ self.trans.cookie.value != self.trans.provider):
self.debug('Invalid transaction, %s != %s' % (
self.trans.cookie.value, self.trans.provider))
except Exception, e: # pylint: disable=broad-except