This commit is contained in:
2018-09-04 17:00:16 +00:00
parent f1ce2baa63
commit a15e02db54
10 changed files with 70 additions and 16 deletions

View File

@@ -104,6 +104,11 @@ namespace AyaNova.Api.Controllers
}
//If the user is inactive they may not login
if (!u.Active)
{
return StatusCode(401, new ApiErrorResponse(ApiErrorCode.NOT_AUTHORIZED, null, "User deactivated"));
}
//build the key (JWT set in startup.cs)
byte[] secretKey = System.Text.Encoding.ASCII.GetBytes(ServerBootConfig.AYANOVA_JWT_SECRET);