public function getAttributes(Request $request)
    {
        $attributes = array();
        if ($this->isAuthenticated($request)) {
            foreach ($this->getAttributeDefinitions() as $name => $def) {
                $value = $this->getAttribute($request, $name);

                if (null === $value) {
                    //$this->attributes[$name] = array();
                } else {
                    if (@$def['charset'] == 'UTF-8') {
                        $value = utf8_decode($value);
                    }
                    $attributes[$name] = (@$def['multivalue'])? explode(';', $value) : $value;
                }
            }
        }
        return $attributes;
    }