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

Support multiple Credential factories #6354

Merged
merged 5 commits into from
Feb 27, 2024

Conversation

jkosternl
Copy link
Contributor

Requests are processed in the order of how the credential factories are specified.
Please verify in the unit tests if I understood every right.

@jkosternl jkosternl self-assigned this Feb 26, 2024
@jkosternl jkosternl linked an issue Feb 26, 2024 that may be closed by this pull request
@jkosternl jkosternl changed the title Issue/6133 Support multiple Credential factories Support multiple Credential factories Feb 26, 2024
Copy link
Contributor

@tnleeuw tnleeuw left a comment

Choose a reason for hiding this comment

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

Some small changes / improvements which I think can be made.

assertEquals("[alias1, account, alias2, TheMaster, TheBachelor]", CredentialFactory.getConfiguredAliases().toString());
assertTrue(CredentialFactory.hasCredential("TheMaster"));
assertTrue(CredentialFactory.hasCredential("fakePrefix:TheBachelor"));

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Can you add a test to see what happens when you have 2 CredentialFactories with the same alias?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it was already covered by checking account which was in both Factories. But I've added some more accounts and data to validate it really works. Also added the check on password-only credential.

Copy link

sonarcloud bot commented Feb 27, 2024

@nielsm5 nielsm5 merged commit c1260f4 into master Feb 27, 2024
16 checks passed
@nielsm5 nielsm5 deleted the issue/6133_supportMultipleCredentialFact branch February 27, 2024 17:50
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.

Support multiple credential factory classes
3 participants