Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new authenticator property. #664

Conversation

Thisara-Welmilla
Copy link
Contributor

@Thisara-Welmilla Thisara-Welmilla commented Sep 14, 2024

Issue:

With wso2/carbon-identity-framework#5938 PR, we have introduced following new properties for authentication configs and authenticator instances.

  • DefinedBy - to indicate whether the authenticator is system-defined or user-defined.
  1. SYSTEM: Sytem defined authenticators, all the existing authenticators are this type.
  2. USER: User defined authenticators, all the custom authenticators of authentication extension come under this type.
  • AuthenticationType - To indicate whether authenticator is one of following
  1. IDENTIFICATION: This authenticator collects the identifier and authenticates user accounts.
  2. VERIFICATION_ONLY: This authenticator can only verify users in the second or subsequent steps of the login
    process.

With this PR following changes are added.

  1. Set new authenticator property DefinedBy for the FederatedAuthenticatedConfig and LocalAuthenticatorConfig objects that pass to the framework.
  2. Retrieve the DefinedBy property from the config and display them in the APIs.
  3. Update yaml files to accommodate above point.

@Thisara-Welmilla Thisara-Welmilla force-pushed the authentication-config-changes branch 3 times, most recently from 6ff59ae to d0f3395 Compare September 21, 2024 19:10
@Thisara-Welmilla Thisara-Welmilla force-pushed the authentication-config-changes branch 3 times, most recently from 4a771bc to c378bdb Compare September 25, 2024 06:22
@Thisara-Welmilla Thisara-Welmilla force-pushed the authentication-config-changes branch 14 times, most recently from 7a4311d to 1c0f40d Compare October 3, 2024 03:21
Comment on lines 426 to 432
if (identityProvider.getFederatedAuthenticatorConfigs().length == 1) {
IdentityConstants.DefinedByType definedByType =
identityProvider.getFederatedAuthenticatorConfigs()[0].getDefinedByType();
authenticator.definedBy(Authenticator.DefinedByEnum.valueOf(definedByType.toString()));
} else {
authenticator.definedBy(Authenticator.DefinedByEnum.SYSTEM);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this else check necessary ?

@Thisara-Welmilla Thisara-Welmilla force-pushed the authentication-config-changes branch from 1c0f40d to 255eda6 Compare October 4, 2024 04:03
@Thisara-Welmilla Thisara-Welmilla force-pushed the authentication-config-changes branch from 255eda6 to 2efd814 Compare October 4, 2024 04:47
@Thisara-Welmilla
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants