Esempio n. 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));
        }
Esempio n. 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());
        }