Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions META-INF/keycloak-scripts.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
{
"authenticators": [
{
"name": "User Enabled Authenticator",
"fileName": "user-enabled-authenticator.js",
"description": "Allow only enabled users"
},
{
"name": "CSM Authenticator",
"fileName": "csm-authenticator.js",
"description": "CSM EmployeeStatus Authenticator"
},
{
"name": "Authorization Authenticator",
"name": "OSC Authz Authenticator",
"fileName": "authz-authenticator.js",
"description": "Authorization Authenticator"
"description": "OSC Authz Authenticator"
}
],
"policies": [],
Expand Down
4 changes: 2 additions & 2 deletions authz-authenticator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ function authenticate(context) {
var allowed = /(REQAPPROVAL|ACTIVE|WEBONLY|RESTRICTED)/;
var employeeStatus = user.getFirstAttribute("employeeStatus");
if (employeeStatus && !allowed.test(employeeStatus)) {
context.failure(AuthenticationFlowError.INVALID_USER);
context.failure(AuthenticationFlowError.USER_DISABLED);
return;
}
} else {
/*
All other clients will authorize if the user account is not disabled or locked
*/
if (user.getFirstAttribute("nsAccountLock") == "TRUE" || user.getFirstAttribute("loginDisabled") == "TRUE") {
context.failure(AuthenticationFlowError.INVALID_USER);
context.failure(AuthenticationFlowError.USER_DISABLED);
return;
}
}
Expand Down
16 changes: 0 additions & 16 deletions csm-authenticator.js

This file was deleted.

13 changes: 0 additions & 13 deletions user-enabled-authenticator.js

This file was deleted.