如何验证或验证JWT签名? [英] How to validate or verify JWT Signature?
问题描述
我正在尝试用Java验证JWT令牌.如何验证或验证JWT令牌的JWT签名?
I am trying to validate JWT token in Java.How to validate or verify JWT Signature of JWT token?
推荐答案
您可以使用Spring Security的JWT库,网址为 https://github.com/spring-projects/spring-security-oauth 和 http://mvnrepository.com/artifact/org.springframework.security/spring-security-jwt/1.0.1.RELEASE .
You can use JWT library from Spring Security available at https://github.com/spring-projects/spring-security-oauth and http://mvnrepository.com/artifact/org.springframework.security/spring-security-jwt/1.0.1.RELEASE.
org.springframework.security.jwt.JwtHelper类具有一个静态方法,该方法使您可以解析JWT令牌并验证其签名.
Class org.springframework.security.jwt.JwtHelper has a static method which allows you to parse the JWT token and verify its signature.
这篇关于如何验证或验证JWT签名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!