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
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Should AddXyz(o => o = { }) also register the default configuration binding? The complication is each auth can be called multiple times with the name overload, so one possible soln is to have an AddXyz that takes a name, and binds to the named section.
Examples:
services.AddCookies();// binds to section: Microsoft.AspNetCore.AspNetCore.Authentication:Cookiesservices.AddCookies("Application");// binds to Microsoft.AspNetCore.AspNetCore.Authentication:Applicationservices.AddOAuth("Github");// binds to Microsoft.AspNetCore.AspNetCore.Authentication:Github// Auth generalizes to services.AddXyzAuthentication()// binds to "Microsoft.AspNetCore.AspNetCore.Authentication:<Xyz>"
services.AddXyzAuthentication(schemeName)// binds to "Microsoft.AspNetCore.AspNetCore.Authentication:<schemeName>"// Frameworks:services.AddIdentity();=>bindstoconfig.GetSection("Microsoft.AspNetCore.Identity")// Generalize to:
services.AddXyz();=>bindsXyzOptions to config.GetSection("Microsoft.AspNetCore.Xyz")
We also should add more support in the binder for things like PathString which cannot be bound today.