PHPackages                             anafay/radius-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. anafay/radius-server

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

anafay/radius-server
====================

Implementation of RADIUS server: both authorization and accounting (RFC 2865, 2866, 2867)

1.0.2(4y ago)016Apache-2.0PHP

Since Apr 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Anafay/radius-server)[ Packagist](https://packagist.org/packages/anafay/radius-server)[ RSS](/packages/anafay-radius-server/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Implementation of RADIUS server: both authorization and accounting (RFC 2865, 2866, 2867).

Usage
=====

[](#usage)

RADIUS server class:
--------------------

[](#radius-server-class)

```
class RadiusServer implements RadiusServerInterface {
    public function onAccessRequest(IncomingMessage $message) {
        if(check($message)){
            $message->replyAccept()
                ->addAttribute(Message::ATTR_FRAMED_IP_ADDRESS, '192.168.0.1')
                ->addAttribute(Message::ATTR_SESSION_TIMEOUT,180)
                ->send();
        }else{
            $message->replyReject()
                ->addAttribute(Message::ATTR_REPLY_MESSAGE,'Restricted')
                ->send();
        }
    }

    public function onAccountingStart(IncomingMessage $message, Session $session) {
        $this->log($session,'start');
    }

    public function onAccountingStop(IncomingMessage $message, Session $session) {
        $this->log($session,'stop');
        $this->save($session);
    }

    public function onInterimUpdate(IncomingMessage $message, Session $session) {
        $this->log($session,'interim');
    }
    ....
}
```

ReactPHP application:
---------------------

[](#reactphp-application)

```
$loop = React\EventLoop\Factory::create();
$radius = new Factory(new RadiusServer(),'secret');
$radius->listen($loop,'10.1.0.1');
$loop->run();
```

Requirements
============

[](#requirements)

The library requires PHP&gt;=7.0 and ReactPHP (event-loop&gt;=1.1, datagram&gt;=1.5).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

1474d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/515eb7e01ce3ebfc3e75f42b2594bd06740488d89d428672b8c42c1a7ab250b0?d=identicon)[Anafay](/maintainers/Anafay)

---

Top Contributors

[![Anafay](https://avatars.githubusercontent.com/u/53856325?v=4)](https://github.com/Anafay "Anafay (11 commits)")

### Embed Badge

![Health badge](/badges/anafay-radius-server/health.svg)

```
[![Health](https://phpackages.com/badges/anafay-radius-server/health.svg)](https://phpackages.com/packages/anafay-radius-server)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
