1<?php
2
3/**
4 * This file is part of the FreeDSx LDAP 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\Ldap\Protocol\ServerProtocolHandler;
13
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 * Handles an unbind. Which just closes the connection.
21 *
22 * @author Chad Sikorra <Chad.Sikorra@gmail.com>
23 */
24class ServerUnbindHandler implements ServerProtocolHandlerInterface
25{
26    /**
27     * {@inheritDoc}
28     */
29    public function handleRequest(LdapMessageRequest $message, TokenInterface $token, RequestHandlerInterface $dispatcher, ServerQueue $queue, array $options): void
30    {
31        $queue->close();
32    }
33}
34