Skip to content

Commit f297148

Browse files
authored
Handle expired password different from disabled account (#6)
* Handle expired password different from disabled account * Bump version
1 parent 8f4c4e1 commit f297148

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

authz-authenticator.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ function authenticate(context) {
2424
/*
2525
All other clients will authorize if the user account is not disabled or locked
2626
*/
27-
if (user.getFirstAttribute("nsAccountLock") == "TRUE" || user.getFirstAttribute("loginDisabled") == "TRUE") {
27+
if (user.getFirstAttribute("nsAccountLock") == "TRUE") {
28+
context.failure(AuthenticationFlowError.CREDENTIAL_SETUP_REQUIRED);
29+
return;
30+
} else if (user.getFirstAttribute("loginDisabled") == "TRUE") {
2831
context.failure(AuthenticationFlowError.USER_DISABLED);
2932
return;
3033
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>edu.osc</groupId>
88
<artifactId>osc-keycloak-scripts</artifactId>
9-
<version>1.4.1</version>
9+
<version>1.4.2</version>
1010
<packaging>jar</packaging>
1111

1212
<properties>

0 commit comments

Comments
 (0)