diff options
Diffstat (limited to 'app/Event')
-rw-r--r-- | app/Event/AuthEvent.php | 27 | ||||
-rw-r--r-- | app/Event/AuthFailureEvent.php | 44 | ||||
-rw-r--r-- | app/Event/AuthSuccessEvent.php | 43 |
3 files changed, 87 insertions, 27 deletions
diff --git a/app/Event/AuthEvent.php b/app/Event/AuthEvent.php deleted file mode 100644 index 7cbced83..00000000 --- a/app/Event/AuthEvent.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -namespace Kanboard\Event; - -use Symfony\Component\EventDispatcher\Event as BaseEvent; - -class AuthEvent extends BaseEvent -{ - private $auth_name; - private $user_id; - - public function __construct($auth_name, $user_id) - { - $this->auth_name = $auth_name; - $this->user_id = $user_id; - } - - public function getUserId() - { - return $this->user_id; - } - - public function getAuthType() - { - return $this->auth_name; - } -} diff --git a/app/Event/AuthFailureEvent.php b/app/Event/AuthFailureEvent.php new file mode 100644 index 00000000..225ac04a --- /dev/null +++ b/app/Event/AuthFailureEvent.php @@ -0,0 +1,44 @@ +<?php + +namespace Kanboard\Event; + +use Symfony\Component\EventDispatcher\Event as BaseEvent; + +/** + * Authentication Failure Event + * + * @package event + * @author Frederic Guillot + */ +class AuthFailureEvent extends BaseEvent +{ + /** + * Username + * + * @access private + * @var string + */ + private $username = ''; + + /** + * Constructor + * + * @access public + * @param string $username + */ + public function __construct($username = '') + { + $this->username = $username; + } + + /** + * Get username + * + * @access public + * @return string + */ + public function getUsername() + { + return $this->username; + } +} diff --git a/app/Event/AuthSuccessEvent.php b/app/Event/AuthSuccessEvent.php new file mode 100644 index 00000000..38323e82 --- /dev/null +++ b/app/Event/AuthSuccessEvent.php @@ -0,0 +1,43 @@ +<?php + +namespace Kanboard\Event; + +use Symfony\Component\EventDispatcher\Event as BaseEvent; + +/** + * Authentication Success Event + * + * @package event + * @author Frederic Guillot + */ +class AuthSuccessEvent extends BaseEvent +{ + /** + * Authentication provider name + * + * @access private + * @var string + */ + private $authType; + + /** + * Constructor + * + * @access public + * @param string $authType + */ + public function __construct($authType) + { + $this->authType = $authType; + } + + /** + * Get authentication type + * + * @return string + */ + public function getAuthType() + { + return $this->authType; + } +} |