實(shí)現(xiàn)ResourceOwnerPassword和client credentials模式:
授權(quán)服務(wù)器:
Program.cs --> Main方法中:需要調(diào)用UseUrls設(shè)置IdentityServer4授權(quán)服務(wù)的IP地址
1 var host = new WebHostBuilder() 2 .UseKestrel() 3 //IdentityServer4的使用需要配置UseUrls 4 .UseUrls("http://localhost:4537") 5 .UseContentRoot(Directory.GetCurrentDirectory()) 6 .UseIISIntegration() 7 .UseStartup<Startup>() 8 .Build();