Skip to content

Commit

Permalink
Validate system authenticators names at registering.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla committed Feb 13, 2025
1 parent d5366d7 commit 90ff1ae
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,11 @@ protected void unsetRealmService(RealmService realmService) {
)
protected void setAuthenticator(ApplicationAuthenticator authenticator) {

/* Verify that the registering system-defined authenticator name starts with the `custom-` prefix,
which is reserved for user-defined authenticators.*/
if (authenticator.getName().startsWith("custom-")) {
return;
}
ApplicationAuthenticatorManager.getInstance().addSystemDefinedAuthenticator(authenticator);

Property[] configProperties = null;
Expand Down

0 comments on commit 90ff1ae

Please sign in to comment.