public static ApiServiceToken parseToken(final String compactToken)
            throws ExpiredJwtException,
            UnsupportedJwtException,
            MalformedJwtException,
            SignatureException,
            IllegalArgumentException {

        Jws<Claims> jws = Jwts.parser().setSigningKey(generalKey()).parseClaimsJws(compactToken);

        Map<String, Object> tokenDetail = (Map<String, Object>) jws.getBody().get("tokenDetail");
        ApiServiceToken apiServiceToken = new ApiServiceToken();
        apiServiceToken.setApiServiceId(Long.valueOf(tokenDetail.get("apiServiceId").toString()));
        apiServiceToken.setApplyTime(null);
        apiServiceToken.setPublisher(tokenDetail.get("publisher").toString());
        apiServiceToken.setApplyUser(tokenDetail.get("applyUser").toString());

        return apiServiceToken;
    }
Parses the given JWS signed compact JWT, returning the claims.
If this method returns without throwing an exception, the token can be trusted.
dss-apps/dss-apiservice-server/src/main/java/com/webank/wedatasphere/dss/apiservice/core/token/JwtManager.java