Skip to content

Commit

Permalink
try throwing exception for deactivated user during OAuthlogin
Browse files Browse the repository at this point in the history
  • Loading branch information
qqmyers committed May 2, 2024
1 parent ef340a9 commit ac8eb44
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ public void exchangeCodeForToken() throws IOException {
}
// login the user and redirect to HOME of intended page (if any).
// setUser checks for deactivated users.
if(dvUser.isDeactivated()) {
throw new OAuth2Exception(-1, "", BundleUtil.getStringFromBundle("deactivated.error"));
}
session.setUser(dvUser);
final OAuth2TokenData tokenData = oauthUser.getTokenData();
if (tokenData != null) {
Expand Down

0 comments on commit ac8eb44

Please sign in to comment.