public static boolean validateToken ( String authToken , UserDetails userDetails ) { String [ ] parts = authToken . split ( TOKEN_SEPARATOR ) ; long expires = Long . parseLong ( parts [ 1 ] ) ; String signature = parts [ 2 ] ; return expires >= System . currentTimeMillis ( ) && signature . equals ( TokenUtils . computeSignature ( userDetails , expires ) ) ; }
Validates the token signature against the user details and the current system time .