Skip to content

Commit

Permalink
Update APIs to support custom authentication management.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla committed Nov 19, 2024
1 parent 3da9303 commit 556500c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ public enum ErrorMessage {
"Unable to decode the provided authenticator ID %s."),
ERROR_CODE_NO_SYSTEM_AUTHENTICATOR_FOUND("60043", "No system authenticator found.",
"No system authenticator found for the provided authenticator Id %s."),
ERROR_COED_MULTIPLE_USER_DEFINED_AUTHENTICATORS_FOUND("60044", "Multiple authenticators found.",
"Multiple user defined authenticators are not allowed."),

// Server Error starting from 650xx.
ERROR_CODE_ERROR_ADDING_IDP("65002",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,10 @@ private void updateFederatedAuthenticatorConfig(IdentityProvider idp, FederatedA
} else {
definedByType = resolveDefinedByTypeToUpdateFederatedAuthenticator(authenticatorName);
}
if (definedByType == DefinedByType.USER && federatedAuthenticators.size() > 1) {
throw handleException(Response.Status.BAD_REQUEST,
Constants.ErrorMessage.ERROR_COED_MULTIPLE_USER_DEFINED_AUTHENTICATORS_FOUND, null);
}
FederatedAuthenticatorConfig authConfig = FederatedAuthenticatorConfigBuilderFactory.build(
authenticator, authenticatorName, definedByType);

Expand Down

0 comments on commit 556500c

Please sign in to comment.