e63dc12dff
Logger and exceptionManager
26 lines
616 B
C#
26 lines
616 B
C#
using Step.Model;
|
|
using System.Web.Http;
|
|
using static Step.Utils.Constants;
|
|
|
|
namespace Step.Controllers
|
|
{
|
|
[RoutePrefix("api/login")]
|
|
public class LoginController : ApiController
|
|
{
|
|
|
|
[Route(), HttpPost]
|
|
public IHttpActionResult DoLogin(UserModel model)
|
|
{
|
|
if (model.Username == "utente" && model.Password == "finto") return Ok();
|
|
return Unauthorized();
|
|
}
|
|
|
|
[WebApiAuthorize(Category = "test", Action = ACTIONS.WRITE)]
|
|
[Route("test"), HttpGet]
|
|
public IHttpActionResult Test()
|
|
{
|
|
return Ok();
|
|
}
|
|
}
|
|
}
|