PHPackages                             outermedia/pdo-authenticator - 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. outermedia/pdo-authenticator

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

outermedia/pdo-authenticator
============================

Generic PDO-Authentication

v1.0.2(10y ago)03.9kMITPHPPHP &gt;=5.5.9

Since Apr 19Pushed 10y ago3 watchersCompare

[ Source](https://github.com/outermedia/pdo-authenticator)[ Packagist](https://packagist.org/packages/outermedia/pdo-authenticator)[ Docs](http://www.outermedia.de)[ RSS](/packages/outermedia-pdo-authenticator/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

pdo-authenticator
=================

[](#pdo-authenticator)

General php authenticator based on PDO to check logins.

\##Installation

At first install or download composer.phar to your computer. Follow the instructions provided by [getcomposer.org](https://getcomposer.org/download/).

### Step 1: Download the project

[](#step-1-download-the-project)

Create an intermediate directory, cd into it and download the latest distribution without tests:

```
php ~/php/composer.phar --prefer-dist require outermedia/pdo-authenticator
```

This creates files in your current working directory:

```
├── composer.json
├── composer.lock
└── vendor
    │   ...
    └── outermedia
        └── pdo-authenticator
            ├── LICENSE
            ├── README.md
            ├── composer.json
            ├── composer.lock
            └── src
                └── main
                    └── webapp
                        ├── Om
                        │   └── Pdo
                        │       └── Authenticator
                        │           ├── DatabaseConfiguration.php
                        │           ├── DatabaseQueryBuilder.php
                        │           ├── PdoAuthenticator.php
                        │           └── RequestHandler.php
                        ├── dbconf.php.template
                        └── index.php

```

Hint: If you want to run the phpunit tests, additionally run (creates new directoy pdo-authenticator/):

```
php ~/php/composer.phar --prefer-source create-project outermedia/pdo-authenticator
pushd pdo-authenticator && vendor/bin/phpunit src/test/php/ && popd

```

Note: The dbunit tests require sqlite3.

\###Step 2: Deploy the files

Now copy the files to your destination directory ($DEST)

```
cp -r vendor/outermedia/pdo-authenticator/src/main/webapp/* $DEST

```

### Step 3: Rename the database settings template

[](#step-3-rename-the-database-settings-template)

Rename the file dbconf.php.template:

```
mv $DEST/dbconf.php.template $DEST/dbconf.php

```

### Step 4: Set your database options

[](#step-4-set-your-database-options)

Edit dbconf.php.

Options are:

- **pdoUrl** - a PDO connection URL e.g. for a local mysql and a database dbname1 "mysql:host=localhost;dbname=dbname1"
- **dbUser** - the username used for the database connection
- **dbPassword** - the password used for the database connection
- **table** - the database table name which holds the user information
- **usernameColumn** - the column name which stores the username (of **table**)
- **passwordColumn** - the column name which stores a user's password (of **table**)

### Step 5: Test you installation

[](#step-5-test-you-installation)

Two POST actions are supported:

a) Get a user's salt ("user1"): Encode your form parameters with the specified charset!

```
curl -X POST -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \
    --data 'action=getsalt&login=user1' http://localhost/pdo-auth/index.php

```

should return something like:

```
{"charset":"latin1","result":true,"salt":"$1$rasmusl1"}

```

The charset used by the database table, the salt and a success flag ("result").

b) Check a user's login: pwd is the calculated hash.

```
curl -X POST -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \
    --data 'action=login&login=user1&pwd=$1$rasmusl1$2ASuKCrDVFQspP8.yIzVl.' \
    http://localhost/pdo-auth/index.php

```

The expected answer is e.g.

```
{"charset":"latin1","result":true}

```

The flag "result" indicates the success.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 62.5% 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

3725d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91baae7d9d55c4c7636ccc99f35e24ede5d05fe82d2db4cbf5ac6ee0a8af2abd?d=identicon)[sba-om](/maintainers/sba-om)

---

Top Contributors

[![sballmann](https://avatars.githubusercontent.com/u/167369081?v=4)](https://github.com/sballmann "sballmann (5 commits)")[![outermedia-sba](https://avatars.githubusercontent.com/u/7554657?v=4)](https://github.com/outermedia-sba "outermedia-sba (3 commits)")

---

Tags

Authenticationlogin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/outermedia-pdo-authenticator/health.svg)

```
[![Health](https://phpackages.com/badges/outermedia-pdo-authenticator/health.svg)](https://phpackages.com/packages/outermedia-pdo-authenticator)
```

###  Alternatives

[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40921.3M88](/packages/auth0-auth0-php)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2795.3M3](/packages/auth0-login)[delight-im/auth

Authentication for PHP. Simple, lightweight and secure.

1.2k149.7k30](/packages/delight-im-auth)[auth0/symfony

Symfony SDK for Auth0 Authentication and Management APIs.

128814.6k](/packages/auth0-symfony)[jmikola/auto-login

Facilitates automatic login via a single token for Symfony's Security component.

99309.6k2](/packages/jmikola-auto-login)[jmikola/auto-login-bundle

Authenticate users in your Symfony app via a single query parameter (e.g. email and newsletter links).

84325.7k](/packages/jmikola-auto-login-bundle)

PHPackages © 2026

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