public function __construct(array $data)
{
foreach (array('client_config_id', 'user_id', 'scope', 'issue_time') as $key) {
if (!array_key_exists($key, $data)) {
throw new TokenException(sprintf("missing field '%s'", $key));
}
}
$this->setClientConfigId($data['client_config_id']);
$this->setUserId($data['user_id']);
$this->setScope($data['scope']);
$this->setIssueTime($data['issue_time']);
}