title: Can a web api attribute return a value
body: <p>I am currently doing some authorization in a web api. I have created a custom AuthorizeAttribute as follows :-</p>
  
  <pre><code>   public class CustomAuthorization : AuthorizeAttribute
      {
  
          public override void OnAuthorization(System.Web.Http.Controllers.HttpActionContext actionContext)
          {
              HandleUnauthorizedRequest(actionContext);
          }
  
          protected override void HandleUnauthorizedRequest(System.Web.Http.Controllers.HttpActionContext actionContext)
          {
  
  }
  
  }
  </code></pre>
  
  <p>Now in the HandleUnauthorizedRequest i am validation my token. The token  contains a user object. What i want is to return the decryted user object to the web api controller as below: -</p>
  
  <pre><code>      [HttpPost()]
          [HttpOptions]
          [CustomAuthorization]
          public PolicyListReturnType GetPolicyList(PolicyListTypeDto listTypeDto)
          {
  //Get user object here;
  }
  </code></pre>
  
  <p>Is this a good method or is there another way of doing this.</p>