refactor: to return the result according to the RFC 7807 standard and add a traceId
This commit is contained in:
@ -30,6 +30,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Mail;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using System.Security.Cryptography;
|
||||
using PasswordPolicy = Mirea.Api.Dto.Common.PasswordPolicy;
|
||||
|
||||
@ -88,7 +89,7 @@ public class SetupController(
|
||||
}
|
||||
|
||||
if (!setupToken.MatchToken(tokenBase64))
|
||||
return Unauthorized("The token is not valid");
|
||||
throw new SecurityException("The token is not valid");
|
||||
|
||||
Response.Cookies.Append(TokenAuthenticationAttribute.AuthToken, token, new CookieOptions
|
||||
{
|
||||
|
Reference in New Issue
Block a user