public HttpResponseMessage GetToken(string username, string password) { String userId = String.Empty; if (IsAuthenticated(username, password, out userId)) { String token = new AuthenticationHelper().GenerateJwtToken(username, userId); return(HttpResponseBuilder.CreateOKResponse(Request, token)); } return(HttpResponseBuilder.CreateUnauthorizedResponse(Request)); }