<?php

/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
// | Geeklog 2.1                                                               |
// +---------------------------------------------------------------------------+
// | Remote Authentication Interface                                           |
// +---------------------------------------------------------------------------+
// | Copyright (C) 2015 by the following authors:                              |
// |                                                                           |
// | Authors: Kenji ITO     mystralkk AT gmail DOT com                         |
// +---------------------------------------------------------------------------+
// |                                                                           |
// | This program is free software; you can redistribute it and/or             |
// | modify it under the terms of the GNU General Public License               |
// | as published by the Free Software Foundation; either version 2            |
// | of the License, or (at your option) any later version.                    |
// |                                                                           |
// | This program is distributed in the hope that it will be useful,           |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of            |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
// | GNU General Public License for more details.                              |
// |                                                                           |
// | You should have received a copy of the GNU General Public License         |
// | along with this program; if not, write to the Free Software Foundation,   |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
// |                                                                           |
// +---------------------------------------------------------------------------+

abstract class RemoteAuthAbstract
{
    /**
     * @var    string $fullname
     */
    public $fullname;

    /**
     * @var    string $email
     */
    public $email;

    /**
     * @var    string $homepage
     */
    public $homepage;

    /**
     * Authenticate the current user with the user name and password given
     * When the user is successfully authenticated, $this->fullname, $this->email,
     * $this->homepage variables should be filled with the information provided
     * by the authenticating server.
     *
     * @param    string $username
     * @param    string $password
     * @return   boolean                true = authentication success, false otherwise
     */
    abstract public function authenticate($username, $password);
}
