Skip to content

protected web api with GetAadIssuerValidator #189

Description

@jrmcdona
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

I am using .NET 5.0 and trying to validate the issuer. Do we have any samples doing this? I have not figure out how to get the service provider (IServiceProvider) in order to call GetRequiredService,

                MicrosoftIdentityIssuerValidatorFactory microsoftIdentityIssuerValidatorFactory =
                **_serviceProvider**.GetRequiredService<MicrosoftIdentityIssuerValidatorFactory>();

                options.TokenValidationParameters.IssuerValidator = microsoftIdentityIssuerValidatorFactory.GetAadIssuerValidator(options.Authority).Validate;

Metadata

Metadata

Assignees

No one assigned

    Labels

    answeredquestionFurther information is requested

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions