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

External   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A attachEvents() 0 4 1
A authenticate() 0 6 1
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