@staticmethod<EOL><INDENT>def requires_authentication(fn):<DEDENT>
@functools.wraps(fn)<EOL>def wrap(*args, **kwargs):<EOL><INDENT>subject = WebYosai.get_current_subject()<EOL>if not subject.authenticated:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise WebYosai.get_current_webregistry().raise_unauthorized(msg)<EOL><DEDENT>return fn(*args, **kwargs)<EOL><DEDENT>return wrap<EOL>
Requires that the calling Subject be authenticated before allowing access.