IdentityServer4 配置

后台服务使用的验证类型(client_credentials)

1、创建客户端

     表clients ClientId='客户端名称'

2、添加客户端验证类型

    表ClientGrantTypes  字段 GrantType=‘client_credentials’ ClientId='客户端ID'

3、添加客户端密钥 

   表ClientSecrets  字段 ClientId='客户端ID'

4、添加允许的作用域    

    表ClientScopes  字段 ClientId='客户端ID'

5、添加Api资源

    表ApiResources 

6、添加Api作用域

   表ApiScopes 字段ApiResourceId=表ApiResources.ID  

   另表ApiScopes 字段Name必须与表ClientScopes中字段Scope值相同,否则会报"invalid_scope"错误。

 

猜你喜欢

转载自www.cnblogs.com/amylis_chen/p/12310761.html