public function equals(SubjectIdentity $identity)
    {
        return $this->provider === $identity->getProvider()
            && $this->identifier === $identity->getIdentifier();
    }
public function equals(SubjectIdentity $identity)
    {
        return $this->provider === $identity->getProvider()
            && $this->identifier === $identity->getIdentifier();
    }
Returns whether or not this subject identity equals the given one.

@param SubjectIdentity $identity

@return bool