1<?php 2 3/** 4 * This file is part of the FreeDSx SASL package. 5 * 6 * (c) Chad Sikorra <Chad.Sikorra@gmail.com> 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * file that was distributed with this source code. 10 */ 11 12namespace FreeDSx\Sasl\Challenge; 13 14use FreeDSx\Sasl\Exception\SaslException; 15use FreeDSx\Sasl\SaslContext; 16 17/** 18 * The challenge / response interface. 19 * 20 * @author Chad Sikorra <Chad.Sikorra@gmail.com> 21 */ 22interface ChallengeInterface 23{ 24 /** 25 * Generate the next response to send in the challenge. It takes two optional parameters: 26 * 27 * - The last message received. Null if no message has been received yet. 28 * - An array of options used for generating the next message. 29 * 30 * The SaslContext returned indicates various aspects of the state of the challenge, including the response. 31 * 32 * @throws SaslException 33 */ 34 public function challenge(?string $received = null, array $options = []): SaslContext; 35} 36