Added logging mechanism for user actions.
This commit is contained in:
@@ -94,13 +94,14 @@ public class UserDao {
|
||||
log.info("User created with ID: {}", userEntity.getId());
|
||||
LoginReq loginReq=new LoginReq();
|
||||
loginReq.setEmail(userEntity.getEmail());
|
||||
LoginAttemptEntity loginAttemptEntity = null;
|
||||
if(userEntity!=null){
|
||||
LoginAttemptEntity loginAttemptEntity =authenticationService.prepareLoginAttemptEntity(loginReq, request);
|
||||
loginAttemptEntity = authenticationService.prepareLoginAttemptEntity(loginReq, request);
|
||||
log.info("Authentication failed for email: {}", loginReq.getEmail());
|
||||
loginAttemptEntity.setUserId(userEntity.getId());
|
||||
authenticationService.createSuccessLoginAttempt(loginAttemptEntity);
|
||||
}
|
||||
return authService.getJWTTokenBean(userEntity, Boolean.TRUE);
|
||||
return authService.getJWTTokenBean(userEntity, Boolean.TRUE, loginAttemptEntity.getId());
|
||||
}
|
||||
|
||||
private BeneficiaryEntity createBeneficiary(RoleEntity roleEntity, UserReq userReq, HubEntity hub) {
|
||||
|
||||
Reference in New Issue
Block a user