marcorombach/laravel-aaf-radius

Laravel 和 AAF RADIUS 服务器 RADIUS 模块

dev-master 2022-09-15 17:30 UTC

This package is auto-updated.

Last update: 2024-09-15 21:46:16 UTC


README

为像NetIQ AAF这样的2FA RADIUS服务器提供简单的RADIUS认证。要使用此包,Laravel 用户模型至少需要一个名为username的字段。建议定义一个登录后路由和错误路由。错误路由使用一个包含显示信息的flashed会话变量(session('error'))调用。

要使用NetIQ Advanced Authentication配置此包,NAS(RADIUS客户端)必须注册在RADIUS策略页面上。

安装

通过composer安装此包

composer require marcorombach/laravel-aaf-radius

您可以使用以下命令发布配置文件:

php artisan vendor:publish --tag="aaf-radius-config"

这是已发布配置文件的内容

return [
    'server' => '', //IP of the Radius Server
    'secret' => '', //Radius secret
    'nasip' => '', //IP of the webserver (Radius Client)
    'post-login-route' => '', //Route to redirect to after login - if not set you will be redirected to the base URL
    'error-route' => '', //Route to redirect to on login error - redirects with $error variable set
];

前三个选项是必需的。

用法

$radius = new LaravelAafRadius();
return $radius->authenticate($request->username, $request->password);

要求

  • PHP 7.4或更高版本
  • Laravel 8.0或更高版本

致谢