You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a very useful library when dealing with older applications that use Windows Authentication.
I was wondering if there is any particular reason why the username, password and domains keys cannot be provided as parameters:
I am thinking about scenarios of testing using multiple users with various roles. This would require a secret file for each of them which is clearly feasible, but not the way Visual Studio treats them (one associated secret file per project).
Is there any reason for this design? If not, I will try to add overloads allowing to pass the keys.
Thank you.
The text was updated successfully, but these errors were encountered:
Alexei000
changed the title
Allow to pass username and password keys as parameters for the UserFact
Allow to pass username and password keys as parameters for the UserFact attribute
Nov 14, 2020
I think an easier way is to use UserFactAttribute(string username, string password, string domain and fetch these using IConfiguration. They can be defined however I want in secrets.json for the development environment and appsettings.json or environment variables when deployed.
My goal is to allow the tests to run both in the development environment and in some pipeline.
When I initially built this it was for a relatively simple single user scenario.
That said, I like your idea of having the keys passed in.
I think the only consideration with adding another overload is that it would have the same method signature as the existing one for the inline credentials. It would require another parameter to differentiate between the inline credentials and the configuration keys.
Did you end up trying to add another overload?
If so, I'm happy to take a look at a PR if you want to open one.
This is a very useful library when dealing with older applications that use Windows Authentication.
I was wondering if there is any particular reason why the username, password and domains keys cannot be provided as parameters:
I am thinking about scenarios of testing using multiple users with various roles. This would require a secret file for each of them which is clearly feasible, but not the way Visual Studio treats them (one associated secret file per project).
Is there any reason for this design? If not, I will try to add overloads allowing to pass the keys.
Thank you.
The text was updated successfully, but these errors were encountered: