using System.Collections.Generic; using System.Web.Http; using Authentication_test.DBO; using iiie.Authentication.Business; using iiie.Authentication.Business.JWT; namespace Authentication_test.Controllers { public class ValuesController : ApiController { [AuthFilter((int)UserRoles.Root)] public IEnumerable Get() { return new [] { "value1", "value2" }; } [AuthFilter((int)UserRoles.NotRoot)] public string Get(int id) { return "value"; } [Route("api/login")] [HttpGet] public string Login(string username) { return TokenManager.GetToken(username, ""); } } }