コード例 #1
0
ファイル: HttpAuth.php プロジェクト: catlabinteractive/neuron
 public static function addFilter(\Neuron\Router $router)
 {
     $checker = new self(\Neuron\Config::get('auth.users'));
     $router->addFilter('basicauth', array($checker, 'check'));
 }
コード例 #2
0
ファイル: Base.php プロジェクト: catlabinteractive/oauth2
 public function setRoutes(Router $router)
 {
     // Add filter
     $router->addFilter('oauth2', array($this, 'routerVerifier'));
     $router->match('GET|POST', $this->routepath . '/setup', '\\CatLab\\OAuth2\\Controllers\\RegisterController@setup');
     // And register
     $router->match('GET|POST', $this->routepath . '/authorize/{param?}', '\\CatLab\\OAuth2\\Controllers\\AuthorizeController@authorize');
     $router->match('GET|POST', $this->routepath . '/register', '\\CatLab\\OAuth2\\Controllers\\RegisterController@register');
     $router->match('GET|POST', $this->routepath . '/token', '\\CatLab\\OAuth2\\Controllers\\AuthorizeController@token');
 }
コード例 #3
0
ファイル: Module.php プロジェクト: catlabinteractive/accounts
 /**
  * Register the routes required for this module.
  * @param Router $router
  * @return mixed
  */
 public function setRoutes(Router $router)
 {
     // Filter
     $router->addFilter('authenticated', array($this, 'routerVerifier'));
     // Routes
     $router->match('GET|POST', $this->routepath . '/login/{authenticator}', '\\CatLab\\Accounts\\Controllers\\LoginController@authenticator');
     $router->match('GET', $this->routepath . '/login', '\\CatLab\\Accounts\\Controllers\\LoginController@login');
     $router->match('GET', $this->routepath . '/welcome', '\\CatLab\\Accounts\\Controllers\\LoginController@welcome')->filter('authenticated');
     $router->match('GET|POST', $this->routepath . '/notverified', '\\CatLab\\Accounts\\Controllers\\LoginController@requiresVerification');
     $router->match('GET', $this->routepath . '/logout', '\\CatLab\\Accounts\\Controllers\\LoginController@logout');
     $router->match('GET', $this->routepath . '/cancel', '\\CatLab\\Accounts\\Controllers\\LoginController@cancel');
     $router->match('GET|POST', $this->routepath . '/register/{authenticator}', '\\CatLab\\Accounts\\Controllers\\RegistrationController@authenticator');
     $router->match('GET|POST', $this->routepath . '/register', '\\CatLab\\Accounts\\Controllers\\RegistrationController@register');
     $router->get($this->routepath . '/verify/{id}', '\\CatLab\\Accounts\\Controllers\\LoginController@verify');
 }