<s> from functools import wraps <EOL> from flask import g , url_for , request , redirect <EOL> def require_openid ( f ) : <EOL> """<STR_LIT>""" <EOL> @ wraps ( f ) <EOL> def decorator ( * args , ** kwargs ) : <EOL> if g . user is None : <EOL> next_url = url_for ( "<STR_LIT>" ) + "<STR_LIT>" + request . url <EOL> return redirect ( next_url ) <EOL> else : <EOL> return f ( * args , ** kwargs ) <EOL> return decorator </s>
