refactor: set cookie name to attribute
This commit is contained in:
@ -69,9 +69,10 @@ public class SetupController(
|
||||
[HttpGet("CheckToken")]
|
||||
public ActionResult<bool> CheckToken([FromQuery] string token)
|
||||
{
|
||||
if (!setupToken.MatchToken(Convert.FromBase64String(token))) return Unauthorized("The token is not valid");
|
||||
if (!setupToken.MatchToken(Convert.FromBase64String(token)))
|
||||
return Unauthorized("The token is not valid");
|
||||
|
||||
Response.Cookies.Append("AuthToken", token, new CookieOptions
|
||||
Response.Cookies.Append(TokenAuthenticationAttribute.AuthToken, token, new CookieOptions
|
||||
{
|
||||
Path = UrlHelper.GetSubPathWithoutFirstApiName + "api",
|
||||
Domain = HttpContext.GetCurrentDomain(),
|
||||
|
Reference in New Issue
Block a user