PHPackages                             daynnnnn/statamic-forward-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. daynnnnn/statamic-forward-auth

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

daynnnnn/statamic-forward-auth
==============================

Allows you to use login using forward authentication.

v4.0.0(1y ago)14.5k1PHPCI passing

Since Jul 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Daynnnnn/statamic-forward-auth)[ Packagist](https://packagist.org/packages/daynnnnn/statamic-forward-auth)[ RSS](/packages/daynnnnn-statamic-forward-auth/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (12)Used By (0)

Statamic Forward Authentication
===============================

[](#statamic-forward-authentication)

Use forward authentication to login to statamic.

How it works
============

[](#how-it-works)

[![Screenshot 2021-07-31 at 16 15 20](https://user-images.githubusercontent.com/25618897/127768699-676427d7-2985-4dab-aaac-22e3fa498b8a.png)](https://user-images.githubusercontent.com/25618897/127768699-676427d7-2985-4dab-aaac-22e3fa498b8a.png)

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

[](#installation)

From a standard Statamic site, you can run: `composer require daynnnnn/statamic-forward-auth`

Then publish the config: `php please vendor:publish --tag="statamic-forward-authentication"`

Setup
=====

[](#setup)

First you'll need to adjust your config/auth.php to use the forward driver on the user provider:

```
'users' => [
    'driver' => 'forward',
],

```

Then you can edit `config/statamic/forward-authentication.php` to setup authentication

Types
=====

[](#types)

By default, there's 2 supported services: `http` and `ldap`

These can be selected via the `default` value in `config/statamic/forward-authentication.php`

LDAP
----

[](#ldap)

### Description

[](#description)

An ldap search will be made of the `base_dn` to find the user. If the user is found, try to bind to the found user using provided password.

### Config

[](#config)

`host: (array)` List of LDAP hsots

`use_ssl: (bool)` Whether host should be accessed with SSL

`base_dn: (string)` Root search DN to find user in.

`username: (string)` Bind users DN.

`password: (string)` Bind users password.

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

[](#requirements)

The LDAP auth service requires LdapRecord:

`composer require directorytree/ldaprecord`

HTTP Authentication
-------------------

[](#http-authentication)

### Description

[](#description-1)

A POST request will be sent to the endpoint with the attributes of `email` and `password`. The expected response is JSON, and should contain the success status of the credentials, and if the success status is true, the full name of a user.

### Config

[](#config-1)

`endpoint: (string)` Address on which login will be attempted

`result: (array)` Where the success status and full name of the user can be found in the JSON response, example:

If your JSON response looks like this:

```
{
  "result": true,
  "data": {
    "name": "Daniel Pegg"
  }
}

```

Your result array should look like this:

```
result => [
    'success' => 'result',
    'name' => 'data.name',
],

```

Extending
=========

[](#extending)

You can also extend this to add your own form of forward authentication, you'll need to create a new class which implements the `AuthServiceContract` interface, and then set a service in `config/statamic/forward-authentication.php`. With the service, the only requirment is that the driver is defined as your class, like this:

`'driver' => App\AuthServices\MyCustomAuthService::class,`

The rest of the config can be setup based on what your custom authentication service needs.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98% 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 ~127 days

Recently: every ~285 days

Total

10

Last Release

607d ago

Major Versions

v1.4.0 → v2.0.02023-05-18

v2.0.0 → v3.0.02024-05-16

v3.0.0 → v4.0.02024-09-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/aaeb2b924f58bd79bed2618a8475e426e0bfcc6dfcb7392757f5e96d09bc5243?d=identicon)[daynnnnn](/maintainers/daynnnnn)

---

Top Contributors

[![Daynnnnn](https://avatars.githubusercontent.com/u/25618897?v=4)](https://github.com/Daynnnnn "Daynnnnn (49 commits)")[![richardhj](https://avatars.githubusercontent.com/u/1284725?v=4)](https://github.com/richardhj "richardhj (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/daynnnnn-statamic-forward-auth/health.svg)

```
[![Health](https://phpackages.com/badges/daynnnnn-statamic-forward-auth/health.svg)](https://phpackages.com/packages/daynnnnn-statamic-forward-auth)
```

###  Alternatives

[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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