Closed akamsteeg closed 4 years ago
This one's tricky because it results in exceptions at runtime instead of some nice errors in the developer's editor. When someone implementing this doesn't have tests on our lib in place it blows up, which is very much possible because why would you test an external lib? I'm not sure how to handle this yet but I'm open to suggestions.
I considered marking `HaveIBeenPwnedClientSettings.ApplicationName
with an ObsoleteAttribute
and introduce a new property ApplicationIdentifier
. This would introduce a warning for users, but that comes with a few drawbacks:
HaveIBeenPwnedClientSettings
yourself;So, I figured this is not a good solution either.
Currently,
HaveIBeenPwnedClientSettings.ApplicationName
defaults to "AtleX.HaveIBeenPwned" so it's not mandatory for users to set it. However, the FAQ of the HaveIBeenPwned.com API makes it absolutely clear that a user should set this:We must remove the default application name and throw an exception from `HaveIBeenPwnedClient when a null or empty application name is set.