jaxrs-jwtauth/src/main/java/de/taimos/dvalin/jaxrs/security/jwt/JWTAuth.java
/**
     * Check the given JWT
     *
     * @param jwtString the JSON Web Token
     * @return the parsed and verified token or null if token is invalid
     * @throws ParseException if the token cannot be parsed
     */
Check the given JWT
@param jwtString the JSON Web Token
@return the parsed and verified token or null if token is invalid
@throws ParseException if the token cannot be parsed
Check the given JWT @param jwtString the JSON Web Token @return the parsed and verified token or null if token is invalid @throws ParseException if the token cannot be parsed
public SignedJWT verifyToken(String jwtString) throws ParseException {
        try {
            SignedJWT jwt = SignedJWT.parse(jwtString);
            if (jwt.verify(new MACVerifier(this.jwtSharedSecret))) {
                return jwt;
            }
            return null;
        } catch (JOSEException e) {
            throw new RuntimeException("Error verifying JSON Web Token", e);
        }
    }
public SignedJWT verifyToken ( String jwtString ) throws ParseException { try { SignedJWT jwt = SignedJWT . parse ( jwtString ) ; if ( jwt . verify ( new MACVerifier ( this . jwtSharedSecret ) ) ) { return jwt ; } return null ; } catch ( JOSEException e ) { throw new RuntimeException ( "Error verifying JSON Web Token" , e ) ; } }
Check the given JWT
 @param jwtString the JSON Web Token
 @return the parsed and verified token or null if token is invalid
 @throws ParseException if the token cannot be parsed
Check the given JWT @param jwtString the JSON Web Token @return the parsed and verified token or null if token is invalid @throws ParseException if the token cannot be parsed