mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 10:04:44 +00:00
Decouple ITokenService from UserAccount entity
Token generation only ever needed the id/username, not the full UserAccount.
This commit is contained in:
@@ -35,8 +35,8 @@ public class LoginHandler(
|
||||
if (!passwordInfrastructure.Verify(request.Password, activeCred.Hash))
|
||||
throw new UnauthorizedException("Invalid username or password.");
|
||||
|
||||
string accessToken = tokenService.GenerateAccessToken(user);
|
||||
string refreshToken = tokenService.GenerateRefreshToken(user);
|
||||
string accessToken = tokenService.GenerateAccessToken(user.UserAccountId, user.Username);
|
||||
string refreshToken = tokenService.GenerateRefreshToken(user.UserAccountId, user.Username);
|
||||
|
||||
return new LoginPayload(user.UserAccountId, user.Username, refreshToken, accessToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user