def secured_task(f):
@wraps(f)<EOL>def secured_task_decorator(*args, **kwargs):<EOL><INDENT>task_data = _get_data_from_args(args)<EOL>assert isinstance(task_data, TaskData)<EOL>if not verify_security_data(task_data.get_data()['<STR_LIT>']):<EOL><INDENT>raise SecurityException(<EOL>task_data.get_data()['<STR_LIT>']['<STR_LIT>'])<EOL><DEDENT>task_data.transform_payload(lambda x: x['<STR_LIT:data>'])<EOL>return f(*args, **kwargs)<EOL><DEDENT>return secured_task_decorator<EOL>
Secured task decorator.