gluon-web-remote

Web remote Administration for big size of gluon routers
git clone git://archive.git.mtrnord.blog/MTRNord/gluon-web-remote.git
Log | Files | Refs | README

None.php (584B)


      1 <?php
      2 
      3 namespace Ssh\Authentication;
      4 
      5 use Ssh\Authentication;
      6 
      7 /**
      8  * Username based authentication
      9  *
     10  * @author Antoine Hérault <antoine.herault@gmail.com>
     11  */
     12 class None implements Authentication
     13 {
     14     protected $username;
     15 
     16     /**
     17      * Constructor
     18      *
     19      * @param  string $username The authentication username
     20      */
     21     public function __construct($username)
     22     {
     23         $this->username = $username;
     24     }
     25 
     26     /**
     27      * {@inheritDoc}
     28      */
     29     public function authenticate($session)
     30     {
     31         return true === ssh2_auth_none($session, $this->username);
     32     }
     33 }