JWT验证器用于C#的JSON Web令牌验证器如何验证方法。函数签名:


bool JWTValidator.Validation(string idToken, string jwksJsonString)

idToken参数是JWT字符串,jwksJsonString参数是JWK URL响应。示例响应:


{

  \"keys\": [

    {

      \"kty\": \"RSA\",

      \"alg\": \"RS256\",

      \"use\": \"sig\",

      \"kid\": \"0a150691dc0793440e70dba11824feb9911d648a\",

      \"n\": \"4uZjoVq3tUy4cmZ7fsnGt_lJ46OtW4fhb1DVupmd8Ig8EaWHsUMD5HXBGXvJIX3R9eSVUQ4TmxNl7Qf2umfqm_K61XTdR036WZfeceKcld\"

    }

  ]

}