一:首先nuget安装 IdentityModel 二:客户端验证模式代码 1.注册客户端获取token访问api static async Task Main(string[] args) { //如果要授权