Closed khellang closed 6 years ago
Too crazy, we don't want to be responsible for making that work everywhere if someone turned this new switch on...
Too crazy, we don't want to be responsible for making that work everywhere if someone turned this new switch on...
I'm assuming that was in response to my option proposal? I guess the ctor is a nice compromise 😄
Yes, the idea is I'm fine making our implementations more extensible (for things like case-insensitivity), I'm not fine with trying to make case-insensitivity first class
Thanks @khellang
Thank you! ❤
Closes https://github.com/aspnet/Home/issues/2827
This will let me derive from
AuthenticationSchemeProvider
, pass inStringComparer.OrdinalIgnoreCase
instead of the defaultStringComparer.Ordinal
, and swap the implementation in the container.It does not affect registration in any way (
SchemeMap
inAuthenticationOptions
is still case-sensitive), but it will let me do scheme lookups without having to worry about the correct casing. I.e.github
andGitHub
will both return the correct scheme.Personally, I'd prefer to take it one step further by adding a
SchemeNameComparer
option toAuthenticationOptions
(as shown in this branch). That would allow me to skip the custom class altogether and just set the property on the options object.What do you think? Too crazy? 😄
// @HaoK @davidfowl @Eilon @Tratcher