public function authenticate(GenericUserInterface $user, $credential)
    {
        $authenticationResult = $this->passwordManager->validate($credential, $user->getCredential());
        if (!$authenticationResult) {
            throw new InvalidCredentialException();
        }

        $this->store($user->getAttributes());

        return true;
    }
public function authenticate(GenericUserInterface $user, $credential)
    {
        $authenticationResult = $this->passwordManager->validate($credential, $user->getCredential());
        if (!$authenticationResult) {
            throw new InvalidCredentialException();
        }

        $this->store($user->getAttributes());

        return true;
    }
public function authenticate ( GenericUserInterface $ user , $ credential ) { $ authenticationResult = $ this -> passwordManager -> validate ( $ credential , $ user -> getCredential ( ) ) ; if ( ! $ authenticationResult ) { throw new InvalidCredentialException ( ) ; } $ this -> store ( $ user -> getAttributes ( ) ) ; return true ; }
Authenticates user with indicated credential

@param \Vegas\Security\Authentication\GenericUserInterface $user
@param $credential
@throws \Vegas\Security\Authentication\Exception\InvalidCredentialException
@return bool
Authenticates user with indicated credential