Skip to content

Commit

Permalink
style: 优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
KouShenhai committed Jul 21, 2024
1 parent f5bf9d0 commit 7e82463
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public AuthA() {
}

public AuthA(String username, String password, String tenantId, String grantType, String uuid, String captcha,
HttpServletRequest request) {
HttpServletRequest request) {
this.id = IdGenerator.defaultSnowflakeId();
this.username = username;
this.password = password;
Expand Down Expand Up @@ -191,16 +191,18 @@ public void updateUser(UserE user) {
this.editor = user.getId();
this.deptId = user.getDeptId();
this.deptPath = user.getDeptPath();
}
else {
} else {
switch (this.grantType) {
case PASSWORD:
case AUTHORIZATION_CODE:
fail(OAUTH2_USERNAME_PASSWORD_ERROR);
break;
case MOBILE:
fail(OAUTH2_MOBILE_NOT_REGISTERED);
break;
case MAIL:
fail(OAUTH2_MAIL_NOT_REGISTERED);
break;
}
}
}
Expand Down

0 comments on commit 7e82463

Please sign in to comment.