PHPackages                             mrjulio/rapture-auth - 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. mrjulio/rapture-auth

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

mrjulio/rapture-auth
====================

Rapture Authentication component

v1.0.1(8y ago)013MITPHP &gt;=5.4.0

Since Jun 15Compare

[ Source](https://github.com/mrjulio/rapture-auth)[ Packagist](https://packagist.org/packages/mrjulio/rapture-auth)[ Docs](http://rapture.iuliann.ro)[ RSS](/packages/mrjulio-rapture-auth/feed)WikiDiscussions Synced 2w ago

READMEChangelogDependenciesVersions (3)Used By (0)

Rapture PHP Authentication component
====================================

[](#rapture-php-authentication-component)

[![PhpVersion](https://camo.githubusercontent.com/b3b25db823332877216c2e619ac9bd10df392da948c782b2c4092064530afa61/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d352e342d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](#)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](#)

Auth component uses interfaces to create the authentication logic:

- `UserInterface` - user model main methods like `getId`, `getName`, `isAuthenticated`, `isAnonymous`
- `SourceInterface` - user fetching method
- `StorageInterface` - user storing (usually a session adapter)

Requirements
------------

[](#requirements)

- PHP v5.4

Install
-------

[](#install)

```
composer require mrjulio/rapture-auth

```

Quick start
-----------

[](#quick-start)

```
class User implements UserInterface, SourceInterface
{
    /*
     * SourceInterface
     */

	/**
     * @param array $data Authentication data
	 *
	 * @return $this
     */
    public function fetchUser($data)
    {
        $data += ['email' => null, 'password' => null];

        $user = UserQuery::create()->filterByEmail($data['email'])->findOne();

        if ($user && password_verify($data['password'], $user->getPassword())) {
            return $user;
        }

        return new self;
    }

    /*
     *  UserInterface
     */

    public function getId()
    {
    	return $this->id;
    }

    /**
     * getName
     *
     * @return string
     */
    public function getName()
    {
        return $this->getFirstname();
    }

    /**
     * Check if user is anonymous
     *
     * @return bool
     */
    public function isAnonymous()
    {
        return (int)$this->getId() == 0;
    }

    /**
     * Check if user is authenticated
     *
     * @return bool
     */
    public function isAuthenticated()
    {
        return !$this->isAnonymous();
    }
}
```

About
-----

[](#about)

### Author

[](#author)

Iulian N. `rapture@iuliann.ro`

### Testing

[](#testing)

```
cd ./test && phpunit

```

### License

[](#license)

Rapture PHP Authentication is licensed under the MIT License - see the `LICENSE` file for details.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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 ~156 days

Total

2

Last Release

3190d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1187463?v=4)[MrJulio](/maintainers/MrJulio)[@mrjulio](https://github.com/mrjulio)

---

Top Contributors

[![mrjulio](https://avatars.githubusercontent.com/u/1187463?v=4)](https://github.com/mrjulio "mrjulio (3 commits)")

---

Tags

library

### Embed Badge

![Health badge](/badges/mrjulio-rapture-auth/health.svg)

```
[![Health](https://phpackages.com/badges/mrjulio-rapture-auth/health.svg)](https://phpackages.com/packages/mrjulio-rapture-auth)
```

###  Alternatives

[litesaml/lightsaml

SAML 2.0 PHP library

1076.6M27](/packages/litesaml-lightsaml)[2amigos/2fa-library

2 Factor Authentication (2FA) library

34396.1k7](/packages/2amigos-2fa-library)[spinen/laravel-discourse-sso

Integrate Discourse SSO into Laravel.

46101.0k](/packages/spinen-laravel-discourse-sso)

PHPackages © 2026

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