Rewrite of the authentication and authorization system

This commit is contained in:
Frederic Guillot
2015-12-05 20:31:27 -05:00
parent 346b8312e5
commit e9fedf3e5c
255 changed files with 14114 additions and 9820 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}