* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
abstract class AuthenticationPlugin extends Plugin
{
//is this plugin authoritative for authentication?
public $authoritative = false;
abstract class AuthenticationPlugin extends Plugin
{
//is this plugin authoritative for authentication?
public $authoritative = false;
//should accounts be automatically created after a successful login attempt?
public $autoregistration = false;
//should accounts be automatically created after a successful login attempt?
public $autoregistration = false;
/**
* Automatically register a user when they attempt to login with valid credentials.
* User::register($data) is a very useful method for this implementation
/**
* Automatically register a user when they attempt to login with valid credentials.
* User::register($data) is a very useful method for this implementation
* Used during autoregistration
* Useful if your usernames are ugly, and you want to suggest
* nice looking nicknames when users initially sign on
* Used during autoregistration
* Useful if your usernames are ugly, and you want to suggest
* nice looking nicknames when users initially sign on
$test_user = User::staticGet('nickname', $suggested_nickname);
if($test_user) {
//someone already exists with the suggested nickname, so used the passed nickname
$test_user = User::staticGet('nickname', $suggested_nickname);
if($test_user) {
//someone already exists with the suggested nickname, so used the passed nickname
}
$test_user = User::staticGet('nickname', $suggested_nickname);
if($test_user) {
//someone already exists with the suggested nickname
//not much else we can do
}else{
}
$test_user = User::staticGet('nickname', $suggested_nickname);
if($test_user) {
//someone already exists with the suggested nickname
//not much else we can do
}else{
}
}else{
if($this->authoritative){
//since we're authoritative, no other plugin could do this
}
}else{
if($this->authoritative){
//since we're authoritative, no other plugin could do this
}else{
if($this->authoritative){
//since we're authoritative, no other plugin could do this
}else{
if($this->authoritative){
//since we're authoritative, no other plugin could do this