PHPackages                             jitesoft/simple-login - 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. jitesoft/simple-login

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

jitesoft/simple-login
=====================

A super simple login system!

1.0.2(8y ago)07MITPHPPHP &gt;=7.1

Since Dec 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jitesoft/simple-login)[ Packagist](https://packagist.org/packages/jitesoft/simple-login)[ RSS](/packages/jitesoft-simple-login/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (6)Versions (5)Used By (0)

Simple Login
============

[](#simple-login)

[![Build Status](https://camo.githubusercontent.com/6fc2db70c81e99f66c4de4cd5456d05043bb3c9665e2378116f3b882bbdebd48/68747470733a2f2f7472617669732d63692e6f72672f6a697465736f66742f73696d706c652d6c6f67696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jitesoft/simple-login)

[![codecov](https://camo.githubusercontent.com/1a276d0c78895972e1ca91dfd2ed20a345799ba71f44cc174e07081144fbe901/68747470733a2f2f636f6465636f762e696f2f67682f6a697465736f66742f73696d706c652d6c6f67696e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/jitesoft/simple-login)

A simple login system which can be used as a standalone package or extended as a package in whatever framework you prefer.

Simple login comes with a very simple dependency container. The container implements the PSR-11 container interface. Which makes it possible to switch to any other PSR-11 compatible container.
Most interfaces extends the PSR-3 `LoggerAwareInterface`, the default logger is a `NullLogger` which ignores all output, it can easily be changed to another logged by binding the `PSR\Log\LoggerInterface` binding in the container or Config class.

Installation
------------

[](#installation)

```
composer require jitesoft/simple-login

```

Usage
-----

[](#usage)

### Out of the box

[](#out-of-the-box)

A few of the interfaces in the package have to be implemented to be able to use the package.
Those include:

- `Jitesoft\SimpleLogin\Auth\AuthenticableInterface`
- `Jitesoft\SimpleLogin\Auth\AuthenticableRepositoryInterface`

When implemented they have to be added to the package config to be possible to be used by the package.

The `AuthenticableInterface` is supposed to be implemented by the User model of the project and the `AuthenticableRepositoryInterface` should handle fetching of the user from whichever database or similar that is used.
In the example directory, you can find a simple example of a implemented repository using `PDO`.

Changing the interfaces
-----------------------

[](#changing-the-interfaces)

Most of the SimpleLogin classes can be changed to your own if wanted. In most cases the interfaces just have to be bound to your own class and it should work right away.
Following is a list of interfaces that are used inside the system to make it work:

- `CookieHandlerInterface` (Defaults to normal cookies).
- `CryptoInterface` (Defaults to the blowfish algorithm).
- `SessionStorageInterface` (Defaults to normal sessions).

The default implementations should be sufficient enough for most systems, but they can be easily changed by setting your bindings when constructing the `Config` object that you pass into the `Jitesoft\SimpleLogin\Auth\Authenticator` constructor.

If you wish to change the Container to another PSR-11 container, you can create a new Config class which inherits from the `Jitesoft\SimpleLogin\Config` class. Set the protected `$container` field to your specific Container implementation and it will be used instead.

By default the following implementations are bound via the Config file:

- `Jitesoft\SimpleLogin\`
    - [`\Cookies\CookieHandlerInterface`](https://github.com/jitesoft/simple-login/blob/master/src/CookieHandler/CookieHandlerInterface.php) - [`\Cookies\CookieHandler`](https://github.com/jitesoft/simple-login/blob/master/src/CookieHandler/CookieHandler.php)
    - [`\Crypto\CryptoInterface`](https://github.com/jitesoft/simple-login/blob/master/src/Crypto/CryptoInterface.php) - [`\Crypto\BlowfishCrypto`](https://github.com/jitesoft/simple-login/blob/master/src/Crypto/BlowfishCrypto.php)
    - [`\Sessions\SessionStorageInterface`](https://github.com/jitesoft/simple-login/blob/master/src/SessionStorage/SessionStorageInterface.php) - [`\Sessions\SessionStorage`](https://github.com/jitesoft/simple-login/blob/master/src/SessionStorage/SessionStorage.php)
- [`PSR\Log\LoggerInterface`](https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php) - [`Jitesoft\Log\NullLogger`](https://github.com/jitesoft/php-loggers/blob/master/src/NullLogger.php)

Examples
--------

[](#examples)

In the [example](https://github.com/jitesoft/simple-login/tree/master/example) directory two examples can be found.

The [LoginLogout](https://github.com/jitesoft/simple-login/tree/master/example/LogginLogout) example shows how to easily use the system to login and logout from a service. To test it, just serve the index file via php (`php -S localhost:8000`) and navigate to `localhost:8000` in the browser. The faked user's password and username are both `admin`.

The [Repository](https://github.com/jitesoft/simple-login/tree/master/example/Repository) example shows how to easily implement your own repository to be used in the system, it uses a `PDO` object to handle the database queries.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

3

Last Release

3104d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/07b2a82fa106892922a64f5a0456ed429fc8d1900f9d29be5475d5083b8f5304?d=identicon)[Jitesoft](/maintainers/Jitesoft)

---

Top Contributors

[![Johannestegner](https://avatars.githubusercontent.com/u/2530181?v=4)](https://github.com/Johannestegner "Johannestegner (37 commits)")

---

Tags

authenticationloginphp

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/jitesoft-simple-login/health.svg)

```
[![Health](https://phpackages.com/badges/jitesoft-simple-login/health.svg)](https://phpackages.com/packages/jitesoft-simple-login)
```

###  Alternatives

[google/auth

Google Auth Library for PHP

1.4k286.7M205](/packages/google-auth)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.8M212](/packages/simplesamlphp-simplesamlphp)[simplesamlphp/saml2

SAML2 PHP library from SimpleSAMLphp

30417.8M41](/packages/simplesamlphp-saml2)[web-auth/webauthn-lib

FIDO2/Webauthn Support For PHP

1237.8M121](/packages/web-auth-webauthn-lib)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51390.8k3](/packages/web-auth-webauthn-framework)

PHPackages © 2026

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