2017 © Pedro Peláez
 

library radius

A PHP RADIUS client implementation

image

boo/radius

A PHP RADIUS client implementation

  • Thursday, June 21, 2018
  • by jyggen
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

RADIUS Client (PHP implementation)

![Source Code][badge-source] Latest Version ![Software License][badge-license] Build Status [![Coverage Status][badge-coverage]][coverage] Total Downloads, (*1)

boo/radius is a PHP 5.5+ RADIUS client implementation., (*2)

Installation

The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:, (*3)

composer require boo/radius

Usage

<?php

use Boo\Radius\Client;
use Boo\Radius\Packet;
use Boo\Radius\PacketType;

$client = new Client('udp://127.0.0.1:1812', /* timeout */ 2);
$response = $client->send(new Packet(PacketType::ACCESS_REQUEST(), /* secret */ 'xyzzy5461', [
    'User-Name' => 'nemo',
    'User-Password' => 'arctangent',
]));

if ($response->getType() !== PacketType::ACCESS_ACCEPT()) {
    throw new \RuntimeException('Unable to authenticate as user "nemo"');
}

Dictionary

The following RADIUS dictionaries are supported out-of-the-box:, (*4)

  • MikroTik
  • RFC 2865
  • RFC 2866
  • RFC 2867
  • RFC 2868
  • RFC 2869
  • RFC 3162
  • RFC 3576
  • RFC 3580
  • RFC 4072
  • RFC 4372
  • RFC 4603
  • RFC 4675
  • RFC 4679
  • RFC 4818
  • RFC 4849
  • RFC 5090
  • RFC 5176

Custom Dictionary

Additional attributes can be registered by creating a custom dictionary class that implements Boo\Radius\DictionaryInterface., (*5)

The boo/radius library is copyright © Jonas Stendahl and licensed for use under the MIT License (MIT). Please see LICENSE for more information., (*6)

The Versions