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 tags in the idp authenticator responses. #758

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Thisara-Welmilla
Copy link
Contributor

@Thisara-Welmilla Thisara-Welmilla commented Dec 10, 2024

Issue:

Following changes are added with this PR:

  1. Fix the issue of missing tags in the user defined federated authenticators.
  2. Improve the FederatedAuthenticatorConfigBuilderFactory class to build list of FederatedAuthenticatorListItem where authenticators will be list with basic info.

Integration tests: wso2/product-is#22002

* FederatedAuthenticatorConfig.
*
* @param fedAuthConfigs Array of FederatedAuthenticatorConfig instances.
* @return List of FederatedAuthenticatorListItem instances.
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing idpResourceId param

*/
if (DefinedByType.USER == config.getDefinedByType()) {
return config.getTags();

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this extra line

if (federatedAuthenticatorConfig != null) {
return federatedAuthenticatorConfig.getTags();
}
return new String[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

return ApplicationAuthenticatorService.getInstance()
        .getFederatedAuthenticatorByName(config.getName())
        .map(FederatedAuthenticatorConfig::getTags)
        .orElse(new String[0]);

@@ -435,6 +466,23 @@ private static void resolveEndpointConfiguration(FederatedAuthenticator authenti
}
}

private static String[] resolveAuthenticatorTags(FederatedAuthenticatorConfig config) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a requirement to return the tags as an array ? Can't we return a List ?

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