Authentication

In Loginet Platform Users are represented as Presentation objects that implement Symfony's AdvancedUserInterface (doc)

They have roles (Loginet\UserBundle\Model\Presentation\Role) implementing Symfony's RoleInterface

User Manager

The UserManager implements Symfony's UserProviderInterface

Creating a User

$user = $this->getUserFactory()->createUser();
$user
    ->setUsername('user')
    ->setEmail('test@test.com')
    ->setPassword('password', $this->get('security.encoder_factory')->getEncoder($user));

$this->getUserManager()->saveUser($user);

Retrieving a User

$user = $this->getUserManager()->loadUserByUsername('user');

Removing a User

$user = $this->getUserManager()->removeUser($user);