/** * {@inheritDoc} */ public function match(CredentialInterface $toCompare) { return $toCompare instanceof KeySecretInterface && $this->getKeySecret()->getKey() === $toCompare->getKey() && $this->getKeySecret()->getSecret() === $toCompare->getSecret(); }
/** * @param CredentialInterface $credential * * @return AuthenticationException */ public static function fromCredential(CredentialInterface $credential) { return new AuthenticationException(sprintf('Failed credential authentication with identifier "%s"', $credential->getIdentifier())); }