PHPackages                             linna/auth-mapper-pgsql - 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. linna/auth-mapper-pgsql

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

linna/auth-mapper-pgsql
=======================

Postgres mapper implementation of the authentication and authorization interfaces.

v0.2.1(3y ago)23701MITPHPPHP &gt;=8.1CI failing

Since Oct 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/linna/auth-mapper-pgsql)[ Packagist](https://packagist.org/packages/linna/auth-mapper-pgsql)[ Docs](https://github.com/linna)[ RSS](/packages/linna-auth-mapper-pgsql/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)Dependencies (6)Versions (5)Used By (0)

 [![Linna Logo](logo-linna-128.png)](#)

 [![Linna Auth Mapper Pgsql Logo](logo-auth-pgsql.png)](#)

[![Tests](https://github.com/linna/auth-mapper-pgsql/actions/workflows/tests.yml/badge.svg)](https://github.com/linna/auth-mapper-pgsql/actions/workflows/tests.yml)[![PDS Skeleton](https://camo.githubusercontent.com/3c7140ee36205075ed977142f25c29eb1fb7809e9b86a865461fc21776ad1665/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7064732d736b656c65746f6e2d626c75652e7376673f7374796c653d666c6174)](https://github.com/php-pds/skeleton)[![PHP 8.1](https://camo.githubusercontent.com/1c708345a94c698fd596459da39a9535062cfa1162a57a8ae4e3cdd54e00a25d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d3838393242462e737667)](http://php.net)

> ***NOTE:*** Code porting to PHP 8.1 ongoing.

About
=====

[](#about)

This package provide a concrete implementation for the authentication interfaces and for the authorization interfaces of the framework.

Mappers use as persistent storage postgresql through php pdo.

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

[](#requirements)

- PHP &gt;= 8.1
- PDO extension
- Postgresql extension
- linna/framework v0.28.0|next

Installation
============

[](#installation)

With composer:

```
composer require linna/auth-mapper-pgsql

```

Package Content
===============

[](#package-content)

### Interfaces from Framework

[](#interfaces-from-framework)

- `Linna\Authentication\EnhancedAuthenticationMapperInterface`
- `Linna\Authorization\PermissionExtendedMapperInterface`
- `Linna\Authorization\PermissionMapperInterface`
- `Linna\Authorization\RoleExtendedMapperInterface`
- `Linna\Authorization\RoleMapperInterface`
- `Linna\Authorization\UserExtendedMapperInterface`
- `Linna\Authorization\UserMapperInterface`

### Implementation

[](#implementation)

- `Linna\Authentication\EnhancedAuthenticationMapper`
    - deleteOldLoginAttempts()
    - fetchAll()
    - fetchAttemptsWithSameIp()
    - fetchAttemptsWithSameSession()
    - fetchAttemptsWithSameUser()
    - fetchById()
    - fetchLimit()
- `Linna\Authorization\PermissionExtendedMapper`
- `Linna\Authorization\PermissionMapper`
    - fetchAll()
    - fetchById()
    - fetchByName()
    - fetchByRole()
    - fetchByRoleId()
    - fetchByRoleName()
    - fetchByUser()
    - fetchByUserId()
    - fetchByUserName()
    - fetchLimit()
    - fetchUserPermissionHashTable()
    - permissionExistById()
    - permissionExistByName()
- `Linna\Authorization\RoleExtendedMapper`
    - addUser()
    - addUserById()
    - addUserByName()
    - grantPermission()
    - grantPermissionById()
    - grantPermissionByName()
    - removeUser()
    - removeUserById()
    - removeUserByName()
    - revokePermission()
    - revokePermissionById()
    - revokePermissionByName()
- `Linna\Authorization\RoleMapper`
    - fetchAll()
    - fetchById()
    - fetchByName()
    - fetchByPermission()
    - fetchByPermissionId()
    - fetchByPermissionName()
    - fetchByUser()
    - fetchByUserId()
    - fetchByUserName()
    - fetchLimit()
- `Linna\Authorization\UserExtendedMapper`
    - addRole()
    - addRoleById()
    - addRoleByName()
    - grantPermission()
    - grantPermissionById()
    - grantPermissionByName()
    - removeRole()
    - removeRoleById()
    - removeRoleByName()
    - revokePermission()
    - revokePermissionById()
    - revokePermissionByName()
- `Linna\Authorization\UserMapper`
    - fetchAll()
    - fetchById()
    - fetchByName()
    - fetchByPermission()
    - fetchByPermissionId()
    - fetchByPermissionName()
    - fetchByRole()
    - fetchByRoleId()
    - fetchByRoleName()
    - fetchLimit()

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.7% 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 ~21 days

Total

2

Last Release

1346d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b0180939371d6dbe2ab2d18829614d90a995b833d6bb7f503a11766f8d130f0?d=identicon)[s3b4stian](/maintainers/s3b4stian)

---

Top Contributors

[![s3b4stian](https://avatars.githubusercontent.com/u/11441761?v=4)](https://github.com/s3b4stian "s3b4stian (29 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

authenticationauthorizationmapperphppostgresqlphpAuthenticationpostgresauthorizationmapper

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/linna-auth-mapper-pgsql/health.svg)

```
[![Health](https://phpackages.com/badges/linna-auth-mapper-pgsql/health.svg)](https://phpackages.com/packages/linna-auth-mapper-pgsql)
```

###  Alternatives

[andalisolutions/oauth2-anaf

Anaf OAuth 2.0 support for the PHP League's OAuth 2.0 Client

195.9k](/packages/andalisolutions-oauth2-anaf)

PHPackages © 2026

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