相关疑难解决方法(0)

在运行HTTPS的应用中,重定向URI以HTTP而非HTTPS的形式发送

我有一个Asp .net核心MVC应用程序。哪个连接到Identity Server 4进行身份验证。托管在Docker群中

MVC应用托管在https:// XXXXXXX上

配置服务

services.AddAuthentication(options =>
        {
            options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
            options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
        })
             .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme)
            .AddOpenIdConnect(OpenIdConnectDefaults.AuthenticationScheme, options =>
            {
                //options.DataProtectionProvider = DataProtectionProvider.Create(new DirectoryInfo(@"C:\temp-keys\"));
                // when the identity has been created from the data we receive,
                // persist it with this authentication scheme, hence in a cookie
                options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                // Identity server endpoint
                options.Authority = settingsSetup.IdentityServerEndpoint;

                // Client id to login with
                options.ClientId = settingsSetup.ClientId;
                // Client secret.
                options.ClientSecret = settingsSetup.Secret;

                // Scope of our API …
Run Code Online (Sandbox Code Playgroud)

c# oauth asp.net-core-mvc identityserver4

6
推荐指数
2
解决办法
2353
查看次数

标签 统计

asp.net-core-mvc ×1

c# ×1

identityserver4 ×1

oauth ×1