blob: 1dca6c78b64e96411521db8cdac460e9474a8b4b [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Adldap\Auth\Events;
4
5use Adldap\Connections\ConnectionInterface;
6
7abstract class Event
8{
9 /**
10 * The connection that the username and password is being bound on.
11 *
12 * @var ConnectionInterface
13 */
14 protected $connection;
15
16 /**
17 * The username that is being used for binding.
18 *
19 * @var string
20 */
21 protected $username;
22
23 /**
24 * The password that is being used for binding.
25 *
26 * @var string
27 */
28 protected $password;
29
30 /**
31 * Constructor.
32 *
33 * @param ConnectionInterface $connection
34 * @param string $username
35 * @param string $password
36 */
37 public function __construct(ConnectionInterface $connection, $username, $password)
38 {
39 $this->connection = $connection;
40 $this->username = $username;
41 $this->password = $password;
42 }
43
44 /**
45 * Returns the events connection.
46 *
47 * @return ConnectionInterface
48 */
49 public function getConnection()
50 {
51 return $this->connection;
52 }
53
54 /**
55 * Returns the authentication events username.
56 *
57 * @return string
58 */
59 public function getUsername()
60 {
61 return $this->username;
62 }
63
64 /**
65 * Returns the authentication events password.
66 *
67 * @return string
68 */
69 public function getPassword()
70 {
71 return $this->password;
72 }
73}