{"id":15173051,"url":"https://github.com/librecodecoop/drupal-external-auth","last_synced_at":"2026-02-03T23:31:48.091Z","repository":{"id":62520763,"uuid":"180240551","full_name":"LibreCodeCoop/drupal-external-auth","owner":"LibreCodeCoop","description":"Composer package to externally authenticate Drupal users","archived":false,"fork":false,"pushed_at":"2019-04-09T22:29:23.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-22T06:45:45.319Z","etag":null,"topics":["auth","authenticator","authentification","composer-packages","composer-project","drupal","drupal-8","drupal8","external","php","php7","php72"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LibreCodeCoop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-08T22:10:34.000Z","updated_at":"2019-05-09T07:44:57.000Z","dependencies_parsed_at":"2022-11-02T13:32:48.778Z","dependency_job_id":null,"html_url":"https://github.com/LibreCodeCoop/drupal-external-auth","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/LibreCodeCoop/drupal-external-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibreCodeCoop%2Fdrupal-external-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibreCodeCoop%2Fdrupal-external-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibreCodeCoop%2Fdrupal-external-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibreCodeCoop%2Fdrupal-external-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LibreCodeCoop","download_url":"https://codeload.github.com/LibreCodeCoop/drupal-external-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibreCodeCoop%2Fdrupal-external-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263499191,"owners_count":23476021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth","authenticator","authentification","composer-packages","composer-project","drupal","drupal-8","drupal8","external","php","php7","php72"],"created_at":"2024-09-27T10:40:18.911Z","updated_at":"2026-02-03T23:31:48.065Z","avatar_url":"https://github.com/LibreCodeCoop.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/LyseonTech/drupal-external-auth.svg?branch=master)](https://travis-ci.org/LyseonTech/drupal-external-auth)\n[![Coverage Status](https://coveralls.io/repos/github/LyseonTech/drupal-external-auth/badge.svg?branch=master)](https://coveralls.io/github/LyseonTech/drupal-external-auth?branch=master)\n[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan)\n[![Latest Stable Version](https://poser.pugx.org/LyseonTech/drupal-external-auth/v/stable)](https://packagist.org/packages/LyseonTech/drupal-external-auth)\n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.2-blue.svg)](https://php.net/)\n[![License](https://poser.pugx.org/LyseonTech/drupal-external-auth/license)](https://packagist.org/packages/LyseonTech/drupal-external-auth)\n\n# Drupal External Auth\n\nComposer package to externally authenticate Drupal users\n\nIf the user exists in Drupal, authenticates the user.\n\nIf the user does not exist in Drupal, it creates the user and authenticates.\n\n## How to use?\n\n```bash\ncomposer require lyseontech/drupal-external-auth\n```\n\n### Login\n```php\n$response = new Response();\n$pdo = new PDO(...);\n\n(new \\DrupalExternalAuth\\Auth($response, $pdo))-\u003eauth([\n    'name'     =\u003e 'username',\n    'pass'     =\u003e 'PrefixHash$' . 'hashOfPassord',\n    'timezone' =\u003e 'America/Sao_Paulo',\n    'langcode' =\u003e 'pt-br',\n    'roles' =\u003e ['administrator']\n]);\n\nforeach ($response-\u003eheaders-\u003egetCookies() as $cookie) {\n    header('Set-Cookie: '.$cookie-\u003egetName().strstr($cookie, '='));\n}\n```\n\nIn PrefixHash, put the prefix hash to identify the hash password from your\nsystem.\n\nIn hashPassord put the hash for user, if don't is necessary the user\nauthenticate in Drupal by default login page of Drupal, put anything in this\nfield.\n\nIf you dont implement custom validation hash in Drupal, the user can only\naccess Drupal through your system.\n\n### Logout\n\n```php\n$response = new Response();\n$pdo = new PDO(...);\n\n(new \\DrupalExternalAuth\\Auth($response, $pdo))-\u003elogout();\nforeach ($response-\u003eheaders-\u003egetCookies() as $cookie) {\n    header('Set-Cookie: '.$cookie-\u003egetName().strstr($cookie, '='));\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrecodecoop%2Fdrupal-external-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibrecodecoop%2Fdrupal-external-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrecodecoop%2Fdrupal-external-auth/lists"}