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\Protocol\LdapMessageRequest;
14use FreeDSx\Ldap\Protocol\Queue\ServerQueue;
15use FreeDSx\Ldap\Server\RequestHandler\RequestHandlerInterface;
16use FreeDSx\Ldap\Server\Token\TokenInterface;
17
18/**
19 * Handles an unbind. Which just closes the connection.
20 *
21 * @author Chad Sikorra <Chad.Sikorra@gmail.com>
22 */
23class ServerUnbindHandler implements ServerProtocolHandlerInterface
24{
25    /**
26     * {@inheritDoc}
27     */
28    public function handleRequest(LdapMessageRequest $message, TokenInterface $token, RequestHandlerInterface $dispatcher, ServerQueue $queue, array $options): void
29    {
30        $queue->close();
31    }
32}
33