<s> from functools import wraps <EOL> from flask import request , abort <EOL> def has_access_token ( tkn ) : <EOL> """<STR_LIT>""" <EOL> def decorator ( f ) : <EOL> @ wraps ( f ) <EOL> def decorated_function ( * args , ** kwargs ) : <EOL> token = request . headers . get ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> if token != tkn : <EOL> abort ( <NUM_LIT> ) <EOL> return f ( * args , ** kwargs ) <EOL> return decorated_function <EOL> return decorator </s>
