安装 IdentityServer4 模板

dotnet new -i IdentityServer4.Template

 

1、IdentityServer4

创建IdentityServer4项目:   dotnet new is4empty -n 项目名                   运行:https://localhost:5001/.well-known/openid-configuration

定义及配置要保护的API

public static class Config
{
    public static IEnumerable<ApiScope> ApiScopes =>
        new List<ApiScope>
        {
            new ApiScope("api1", "My API")
        };
}
View Code

相关文章:

  • 2021-12-25
  • 2022-02-11
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2021-08-22
  • 2021-10-27
  • 2021-09-10
猜你喜欢
  • 2022-01-22
  • 2021-05-11
  • 2021-07-28
  • 2021-08-24
  • 2022-01-08
相关资源
相似解决方案