public final boolean isValid ( HttpServletRequest req , String token ) { String storedToken = getStoredToken ( req ) ; if ( storedToken == null ) return false ; return storedToken . equals ( token ) ; }
Tests given token against stored one .