|
|
|
@ -35,7 +35,7 @@ namespace UserCenter.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public ActionResult GetToken([FromBody]LoginModel model)
|
|
|
|
|
public ActionResult GetToken([FromBody] LoginModel model)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -110,7 +110,7 @@ namespace UserCenter.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public ActionResult RefreshToken([FromBody][Required(ErrorMessage = nameof(RequiredAttribute))]string refreshToken)
|
|
|
|
|
public ActionResult RefreshToken([FromBody][Required(ErrorMessage = nameof(RequiredAttribute))] string refreshToken)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -132,5 +132,25 @@ namespace UserCenter.Controllers
|
|
|
|
|
return Problem(ex.Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IActionResult GetLayout()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
return Ok(new
|
|
|
|
|
{
|
|
|
|
|
logo = this._settingService.GetSetting("logo").Value,
|
|
|
|
|
name = this._settingService.GetSetting("name").Value,
|
|
|
|
|
copyright = this._settingService.GetSetting("copyright").Value,
|
|
|
|
|
version = Helper.Instance.GetVersion(),
|
|
|
|
|
username = this.HttpContext.User.Identity.IsAuthenticated ? this.HttpContext.User.Identity.Name : null
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
ex.PrintStack();
|
|
|
|
|
return Problem(ex.Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|