def oid_login_handler(self, f, oid):
if request.args.get("<STR_LIT>") != u"<STR_LIT:yes>":<EOL><INDENT>return f(False)<EOL><DEDENT>consumer = Consumer(SessionWrapper(self), oid.store_factory())<EOL>openid_response = consumer.complete(<EOL>request.args.to_dict(), oid.get_current_url()<EOL>)<EOL>if openid_response.status == SUCCESS:<EOL><INDENT>return self.after_login(OpenIDResponse(openid_response, []))<EOL><DEDENT>elif openid_response.status == CANCEL:<EOL><INDENT>oid.signal_error(u"<STR_LIT>")<EOL>return redirect(oid.get_current_url())<EOL><DEDENT>oid.signal_error(u"<STR_LIT>")<EOL>return redirect(oid.get_current_url())<EOL>
Hackish method to make use of oid.login_handler decorator.