https://github.com/linna/auth-mapper-pgsql
Postgres mapper implementation of the authentication and authorization interfaces
https://github.com/linna/auth-mapper-pgsql
authentication authorization mapper php postgresql
Last synced: 9 months ago
JSON representation
Postgres mapper implementation of the authentication and authorization interfaces
- Host: GitHub
- URL: https://github.com/linna/auth-mapper-pgsql
- Owner: linna
- License: mit
- Created: 2019-09-21T10:04:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T09:51:09.000Z (over 2 years ago)
- Last Synced: 2025-08-29T16:32:11.167Z (10 months ago)
- Topics: authentication, authorization, mapper, php, postgresql
- Language: PHP
- Size: 110 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://github.com/linna/auth-mapper-pgsql/actions/workflows/tests.yml)
[](https://github.com/php-pds/skeleton)
[](http://php.net)
> **_NOTE:_** Code porting to PHP 8.1 ongoing.
# 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
* PHP >= 8.1
* PDO extension
* Postgresql extension
* linna/framework v0.28.0|next
# Installation
With composer:
```
composer require linna/auth-mapper-pgsql
```
# Package Content
### 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
* `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()

