-
Notifications
You must be signed in to change notification settings - Fork 76
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
Conversation
There was a problem hiding this 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.
credentialProvider/src/main/java/org/frankframework/credentialprovider/CredentialFactory.java
Outdated
Show resolved
Hide resolved
credentialProvider/src/main/java/org/frankframework/credentialprovider/CredentialFactory.java
Outdated
Show resolved
Hide resolved
credentialProvider/src/main/java/org/frankframework/credentialprovider/CredentialFactory.java
Outdated
Show resolved
Hide resolved
credentialProvider/src/main/java/org/frankframework/credentialprovider/CredentialFactory.java
Outdated
Show resolved
Hide resolved
assertEquals("[alias1, account, alias2, TheMaster, TheBachelor]", CredentialFactory.getConfiguredAliases().toString()); | ||
assertTrue(CredentialFactory.hasCredential("TheMaster")); | ||
assertTrue(CredentialFactory.hasCredential("fakePrefix:TheBachelor")); | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Quality Gate passedIssues Measures |
Requests are processed in the order of how the credential factories are specified.
Please verify in the unit tests if I understood every right.