feat(mobile-api): admin login, first-login, forgot password, logout, refresh and me
Wrong, blank or failed logins all answer the same 401. A deactivated admin is refused and the token services-auth issued is revoked. resetAdminPassword now refuses deactivated users and users without an email. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
1bfc1c73c6
commit
9f22837a00
14 files changed
+567
-2
No files matched your search
+2
-1
@@ -853,7 +853,8 @@ public class UserController {
|
||||
User user = userService.findByUsername(username);
|
||||
if(user == null)return 0;
|
||||
if(!user.getType().equals(UserType.A)) return 0;
|
||||
if(!user.getEmail().equalsIgnoreCase(emailAddress)) return 0;
|
||||
if(!user.isEnabled()) return 0;
|
||||
if(user.getEmail() == null || !user.getEmail().equalsIgnoreCase(emailAddress)) return 0;
|
||||
|
||||
String randPassword = validateUtil.getRandomPasswordString(8);
|
||||
String newPassword = bCryptPasswordEncoder.encode(randPassword);
|
||||
|
||||
Reference in new issue
Block a user