Skip to content

Commit

Permalink
Merge branch 'release-0.2.0' into feat/kevin-1588
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-hashimoto authored Jan 16, 2025
2 parents 16edad6 + 549996a commit e9d70cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/lcfs/services/keycloak/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ async def authenticate(self, request):
await self.create_login_history(
user_token, False, error_text
)
raise HTTPException(status_code=401, detail=error_text)
raise HTTPException(status_code=403, detail=error_text)
else:
# Already found by keycloak_user_id => return
return AuthCredentials(["authenticated"]), user
Expand Down Expand Up @@ -204,7 +204,7 @@ async def authenticate(self, request):
if not user.is_active:
error_text = "The account is currently inactive."
await self.create_login_history(user_token, False, error_text)
raise HTTPException(status_code=401, detail=error_text)
raise HTTPException(status_code=403, detail=error_text)
else:
error_text = "preferred_username or email is required in JWT payload."
raise HTTPException(status_code=401, detail=error_text)
Expand Down

0 comments on commit e9d70cc

Please sign in to comment.