private function getRoles(ApiUserInterface $user)
    {
        $roles = $user->getRoles();
        if ($user->getApiKeyEnabled()) {
            $roles[] = $this->apiUserRole;
        }

        return $roles;
    }
private function getRoles(ApiUserInterface $user)
    {
        $roles = $user->getRoles();
        if ($user->getApiKeyEnabled()) {
            $roles[] = $this->apiUserRole;
        }

        return $roles;
    }
private function getRoles ( ApiUserInterface $ user ) { $ roles = $ user -> getRoles ( ) ; if ( $ user -> getApiKeyEnabled ( ) ) { $ roles [ ] = $ this -> apiUserRole ; } return $ roles ; }
Add API user role to authenticated token
@param ApiUserInterface $user
@return array
Add API user role to authenticated token