示例#1
0
        public static MicrosoftIdentityAppCallsWebApiAuthenticationBuilder AddMicrosoftWebApiCallsWebApi(
            this MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration builder,
            Action <ConfidentialClientApplicationOptions> configureConfidentialClientApplicationOptions,
            Action <MicrosoftIdentityOptions> configureMicrosoftIdentityOptions,
            string jwtBearerScheme = JwtBearerDefaults.AuthenticationScheme)
        {
            if (builder is null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder.EnableTokenAcquisitionToCallDownstreamApi(configureConfidentialClientApplicationOptions));
        }
示例#2
0
        public static MicrosoftIdentityAppCallsWebApiAuthenticationBuilder AddMicrosoftWebApiCallsWebApi(
            this MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration builder,
            IConfiguration configuration,
            string configSectionName = Constants.AzureAd,
            string jwtBearerScheme   = JwtBearerDefaults.AuthenticationScheme)
        {
            if (builder is null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder.EnableTokenAcquisitionToCallDownstreamApi());
        }