title: asp.net vnext. mvc 6. Implement simple own authorization
body: <p>I am writing simple REST service for leaning vNext and new MVC. I want to understand how to create a simple OWIN authorization with custom logic. 
  For example, imagine that a service has just a simple in-memory list of tokens and I want to check that a request contains token that exist in that list.</p>
  
  <p>If I understood properly, I just need to override AuthorizeAttribute class, but I cannot find how to do this in the right way.</p>
  
  <pre><code>public class CustomAuthorize : AuthorizeAttribute
  {
      public override Task OnAuthorizationAsync(AuthorizationContext context)
      {
          return base.OnAuthorizationAsync(context);
      }
  }
  </code></pre>
  
  <p>If I misunderstood this, could you please explain what classes I need to use and can I do it.</p>