0
私の.netコア1.1コードでは、以下のように認証を行っています(これは、外部URLにベアラトークンを送り、返信トークンでクレームを探します)。このコードは、 Core 1.1から2.0への移行 - 認証
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationScheme = "Cookies"
});
app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions
{
AuthenticationScheme = "oidc",
SignInScheme = "Cookies",
Authority = signinAuthority,
RequireHttpsMetadata = signinHTTPS,
ClientId = "skybus",
ClientSecret = "secret",
ResponseType = "code id_token",
Scope = { "api1", "offline_access" },
GetClaimsFromUserInfoEndpoint = true,
SaveTokens = true
});
は、今私は両方
UseCookieAuthentication
&
UseOpenIdConnectAuthentication
が変更されているが、コア2.0を.NETに自分のコードをアップグレードし
Configure
方法です。私はそれは難しい私は上記の変更後にこのURLを参照してくださいブラウザで
ConfigureServices
方法
services.AddAuthentication(options => {
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
})
.AddCookie()
.AddOpenIdConnect(o =>
{
o.Authority = signinAuthority;
o.SignInScheme = "Cookies";
o.RequireHttpsMetadata = signinHTTPS;
o.ClientId = "skybus";
o.ClientSecret = "secret";
o.ResponseType = "code id_token";
o.GetClaimsFromUserInfoEndpoint = true;
o.SaveTokens = true;
o.Scope.Add("api1");
o.Scope.Add("offline_access");
});
で次のようにそれがあるために何が変わったこの場合
に行われる必要があるものを見つけるために探しています。これは、ユーザーがログインしていない場合は私の外部のログインページを表示したり、私のウェブサイトのホームページにあなたがIdentityServer4を使用している場合、私は知らないが、彼らが提供している