#NEWLINE# @ frontend . route ( '/login/openid' , methods = [ 'GET' , 'POST' ] ) #NEWLINE# @ oid . loginhandler #NEWLINE# def login_openid( ) : #NEWLINE# #INDENT# if current_user . is_authenticated ( ) : #NEWLINE# #INDENT# return redirect ( url_for ( 'user.index' ) ) #NEWLINE# #UNINDENT# form = OpenIDForm ( ) #NEWLINE# if form . validate_on_submit ( ) : #NEWLINE# #INDENT# openid = form . openid . data #NEWLINE# current_app . logger . debug ( ( 'login with openid(%s)...' % openid ) ) #NEWLINE# return oid . try_login ( openid , ask_for = [ 'email' , 'fullname' , 'nickname' ] ) #NEWLINE# #UNINDENT# return render_template ( 'frontend/login_openid.html' , form = openid , error = oid . fetch_error ( ) )