PHPackages                             lyseontech/drupal-external-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. lyseontech/drupal-external-auth

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

lyseontech/drupal-external-auth
===============================

External authenticator user into Drupal

0.2.1(7y ago)0521MITPHPPHP &gt;=7.2

Since Apr 8Pushed 7y ago3 watchersCompare

[ Source](https://github.com/LibreCodeCoop/drupal-external-auth)[ Packagist](https://packagist.org/packages/lyseontech/drupal-external-auth)[ Docs](https://github.com/lyseontech/drupal-external-auth)[ RSS](/packages/lyseontech-drupal-external-auth/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (4)Dependencies (8)Versions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/3978fdfb847947bec58f771e20307ea1eab7847b060270cf9c08549f286262f5/68747470733a2f2f7472617669732d63692e6f72672f4c7973656f6e546563682f64727570616c2d65787465726e616c2d617574682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/LyseonTech/drupal-external-auth)[![Coverage Status](https://camo.githubusercontent.com/cb9e463bede8d5b8a871a57eec38f92e2c772a52a4e9306c24d3bbb9445247e8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4c7973656f6e546563682f64727570616c2d65787465726e616c2d617574682f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/LyseonTech/drupal-external-auth?branch=master)[![PHPStan](https://camo.githubusercontent.com/441b5874ce4df0a2defc892979c96c46889b69cb32119d04f0b48626349f8bc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/phpstan/phpstan)[![Latest Stable Version](https://camo.githubusercontent.com/4b1b9237a9d0997f688f1c0af9f999a34f496adf571061a28676a3153e4605e8/68747470733a2f2f706f7365722e707567782e6f72672f4c7973656f6e546563682f64727570616c2d65787465726e616c2d617574682f762f737461626c65)](https://packagist.org/packages/LyseonTech/drupal-external-auth)[![Minimum PHP Version](https://camo.githubusercontent.com/a4f22f6711703a9e9345fe97cbda880918118648ceee1d89d5991489b9de9f66/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e322d626c75652e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/81eaeb5e7cb45d5e016592a4d7dd38000275c5aecc24a3c496749d0231d66ac9/68747470733a2f2f706f7365722e707567782e6f72672f4c7973656f6e546563682f64727570616c2d65787465726e616c2d617574682f6c6963656e7365)](https://packagist.org/packages/LyseonTech/drupal-external-auth)

Drupal External Auth
====================

[](#drupal-external-auth)

Composer package to externally authenticate Drupal users

If the user exists in Drupal, authenticates the user.

If the user does not exist in Drupal, it creates the user and authenticates.

How to use?
-----------

[](#how-to-use)

```
composer require lyseontech/drupal-external-auth
```

### Login

[](#login)

```
$response = new Response();
$pdo = new PDO(...);

(new \DrupalExternalAuth\Auth($response, $pdo))->auth([
    'name'     => 'username',
    'pass'     => 'PrefixHash$' . 'hashOfPassord',
    'timezone' => 'America/Sao_Paulo',
    'langcode' => 'pt-br',
    'roles' => ['administrator']
]);

foreach ($response->headers->getCookies() as $cookie) {
    header('Set-Cookie: '.$cookie->getName().strstr($cookie, '='));
}
```

In PrefixHash, put the prefix hash to identify the hash password from your system.

In hashPassord put the hash for user, if don't is necessary the user authenticate in Drupal by default login page of Drupal, put anything in this field.

If you dont implement custom validation hash in Drupal, the user can only access Drupal through your system.

### Logout

[](#logout)

```
$response = new Response();
$pdo = new PDO(...);

(new \DrupalExternalAuth\Auth($response, $pdo))->logout();
foreach ($response->headers->getCookies() as $cookie) {
    header('Set-Cookie: '.$cookie->getName().strstr($cookie, '='));
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

4

Last Release

2594d ago

PHP version history (2 changes)0.1PHP &gt;=7

0.1.1PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32546069?v=4)[LibreCode coop](/maintainers/librecodecoop)[@LibreCodeCoop](https://github.com/LibreCodeCoop)

---

Top Contributors

[![vitormattos](https://avatars.githubusercontent.com/u/1079143?v=4)](https://github.com/vitormattos "vitormattos (19 commits)")

---

Tags

authauthenticatorauthentificationcomposer-packagescomposer-projectdrupaldrupal-8drupal8externalphpphp7php72authdrupalexternal

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lyseontech-drupal-external-auth/health.svg)

```
[![Health](https://phpackages.com/badges/lyseontech-drupal-external-auth/health.svg)](https://phpackages.com/packages/lyseontech-drupal-external-auth)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[kreait/firebase-tokens

A library to work with Firebase tokens

24040.8M14](/packages/kreait-firebase-tokens)[bshaffer/oauth2-server-httpfoundation-bridge

A bridge to HttpFoundation for oauth2-server-php

522.3M12](/packages/bshaffer-oauth2-server-httpfoundation-bridge)

PHPackages © 2026

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