Home > other >  MVC client login validation callback is unusual, use Identityserver4 authentication server
MVC client login validation callback is unusual, use Identityserver4 authentication server

Time:10-24


I have a MVC client, using the mixed mode authentication, the local operation no problem, but after deployment to the server, is4 certification after the callback, just jump straight to the/signin - oidc, prompt the page can't normal operation, if the problem still exists, please contact the website owners, HTTP ERROR 400, look at the journal also didn't see the ERROR log output,

The following is the client code:

JwtSecurityTokenHandler. DefaultInboundClaimTypeMap. The Clear ();
Services. AddAuthentication (options=& gt;
{
Options. DefaultScheme="Cookies";
Options. DefaultChallengeScheme="oidc";
})
AddCookie (" Cookies ")
AddOpenIdConnect (" oidc ", the options=& gt;
{
Options. SignInScheme="Cookies";

Options. Authority="http://192.168.10.100:8080";
Options. RequireHttpsMetadata=https://bbs.csdn.net/topics/false;

Options. ClientId="MVC";
Options. ClientSecret="secret";
Options. ResponseType="code id_token";

Options. SaveTokens=true;
Options. GetClaimsFromUserInfoEndpoint=true;

The options. The Scope. The Clear ();
The options. The Scope. The Add (" openid ");
The options. The Scope. The Add (" profile ");

});


App. UseCookiePolicy ();
App. UseAuthentication ();
App. UseStaticFiles ();
App. UseMvc (routes=& gt;
{
Routes. The MapRoute (
Name: "default",
The template: "{controller=Home}/{action=Index}/{id? } ");
});

Look from the code, I could not find what is the problem, using the same method to deploy the multiple sites, other can, is this not line, server authentication success, just jump straight to the http://192.168.10.133/signin-oidc, 400 mistakes at the same time,
The client logs:
2019-05-11 10:51:24.283 +08:00 [WRN] Using an in-memory repository. Keys will not be persisted to storage.2019-05-11 10:51:24.402 +08:00 [WRN] Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.2019-05-11 10:51:24.530 +08:00 [WRN] No XML encryptor configured. Key "3c666a7d-6e97-4f97-8b52-861cb03f5347" may be persisted to storage in unencrypted form.2019-05-11 10:51:26.492 +08:00 [INF] Cookies was not authenticated. Failure message: Unprotect ticket failed2019-05-11 10:51:27.104 +08:00 [INF] AuthenticationScheme: oidc was challenged.

Is4 server side also does not have the error log
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related