1. Verify Global
config.Filters.Add(new AuthorizeAttribute());
2. Controller-level verification
[Authorize] public class HelloController : ApiController { public string GetTest() { return "hello,world"; } }
3. Method-level verification
public class HelloController : ApiController { [Authorize] public string GetTest() { return "hello,world"; } }
Access will be
http://localhost:55658/api/hello