Пример #1
0
        public ActionResult GenerateNewToken(int id, int tokenId)
        {
            var newAppToken = _applications.CreateNewToken(id, tokenId, LoggedInUser);

            // Return details about generate token
            return(Json(new
            {
                id = newAppToken.ID,
                url = Url.Action("GenerateNewToken", new { id = newAppToken.ApplicationID, tokenId = newAppToken.ID }),
                token = HttpUtility.UrlEncode(newAppToken.Token)
            },
                        JsonRequestBehavior.AllowGet));
        }