2017-02-22 51 views

回答

11

根據ConfigureServices方法(在啓動時)添加在SetupIdentityServer選擇方法:

services.AddIdentityServer(*SetupIdentityServer*) 
     .AddSigningCredential(...) 
     .AddValidationKeys() 
     .AddConfigurationStore(builder => builder.UseSqlServer("")) 
     .AddOperationalStore(builder => builder.UseSqlServer("")) 
     .AddAspNetIdentity<ApplicationUser>(); 

...其中SetupIdentityServer在這裏你可以設置登錄網址的方法的名稱:

private static void SetupIdentityServer(IdentityServerOptions identityServerOptions) 
{ 
    identityServerOptions.UserInteraction.LoginUrl = "/Controller/Action"; 
}