Lines Matching defs:challenge
22 * The CRAM-MD5 challenge / response class.
50 public function challenge(?string $received = null, array $options = []): SaslContext
71 $nonce = $options['challenge'] ?? $this->generateNonce(32);
72 $challenge = new Message(['challenge' => $nonce]);
73 $this->context->setResponse($this->encoder->encode($challenge, $this->context));
74 $this->context->set('challenge', $challenge->get('challenge'));
81 if (!$received->has('challenge')) {
82 throw new SaslException('Expected a server challenge to generate a client response.');
89 'digest' => $this->generateDigest($received->get('challenge'), $options['password']),
111 throw new SaslException('The password option must be callable. It will be passed the username and challenge');
113 $expectedDigest = $password($username, $this->context->get('challenge'));
119 protected function generateDigest(string $challenge, string $key): string
123 $challenge,