1<?php
2/**
3 * This file is part of the FreeDSx LDAP package.
4 *
5 * (c) Chad Sikorra <Chad.Sikorra@gmail.com>
6 *
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
9 */
10
11namespace FreeDSx\Ldap\Protocol\ServerProtocolHandler;
12
13use FreeDSx\Ldap\Exception\OperationException;
14use FreeDSx\Ldap\Protocol\LdapMessageRequest;
15use FreeDSx\Ldap\Protocol\Queue\ServerQueue;
16use FreeDSx\Ldap\Server\RequestHandler\RequestHandlerInterface;
17use FreeDSx\Ldap\Server\Token\TokenInterface;
18
19/**
20 * Used for handlers dealing with bind requests to send back tokens.
21 *
22 * @author Chad Sikorra <Chad.Sikorra@gmail.com>
23 */
24interface BindHandlerInterface
25{
26    /**
27     * Returns a token indicating the outcome of a bind request.
28     *
29     * @throws OperationException
30     */
31    public function handleBind(LdapMessageRequest $message, RequestHandlerInterface $dispatcher, ServerQueue $queue, array $options): TokenInterface;
32}
33