Completed
Pull Request — master (#80)
by
unknown
21:30
created

External::attachEvents()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Alex [email protected]
5
 * Date: 19.09.2018
6
 */
7
8
namespace Fabiang\Xmpp\EventListener\Stream\Authentication;
9
10
use Fabiang\Xmpp\EventListener\AbstractEventListener;
11
12
/**
13
 * Class External
14
 * @package Fabiang\Xmpp\EventListener\Stream\Authentication
15
 */
16
class External extends AbstractEventListener implements AuthenticationInterface
17
{
18
    /**
19
     * {@inheritDoc}
20
     */
21
    public function attachEvents()
22
    {
23
24
    }
25
26
    /**
27
     * {@inheritDoc}
28
     */
29
    public function authenticate($username, $password)
30
    {
31
        $this->getConnection()->send(
32
            '<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="EXTERNAL"/>'
33
        );
34
    }
35
}
36