AzureFunctionsOpenIDConnectAuthSample
AzureFunctionsOpenIDConnectAuthSample copied to clipboard
Ability to extend configuration
Hi @bryanknox , excellent work on this. I saw an issue raised to create a Nuget package for this, which will be awesome! Before publishing could you make the package extensible so that the developers are responsible for providing IssuerUrl and ClientId etc. I'm running into an issue where my issuer has a mismatch, because of the ending slash. Even when I removed the slash from the Issuer in my config, looks like you are appending a backslash at the end.
Also, I think people should be able to add their own Token Validation option, can you do something like the following pattern, using Action
services.AddOidcAuthentication(options => {
options.ClientId = $"{ClientId}";
options.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters
{
ValidateIssuer = true,
ValidIssuer = ${IssuerUrl}
ValidAudience = $"{ClientId}",
}}
})