mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
Return 401 instead 403 when authenticating an user (#734)
Co-authored-by: Francisco Zanini <francisco@digifort.com.br>
This commit is contained in:
parent
833195243e
commit
a7ea6c8369
@ -420,7 +420,7 @@ begin
|
||||
begin
|
||||
FAuthenticationHandler.OnAuthentication(AContext, LUsername, LPassword, LRolesList, LIsValid, LSessionData);
|
||||
if not LIsValid then
|
||||
raise EMVCJWTException.Create(HTTP_STATUS.Forbidden, 'Forbidden');
|
||||
raise EMVCJWTException.Create(HTTP_STATUS.Unauthorized, 'Unauthorized');
|
||||
end;
|
||||
|
||||
LJWTValue := TJWT.Create(FSecret, FLeewaySeconds);
|
||||
|
Loading…
Reference in New Issue
Block a user