method validate_token and attributes with output json