{"id":15173105,"url":"https://github.com/drupaltest/behat-one-time-login","last_synced_at":"2026-01-25T18:34:01.969Z","repository":{"id":47869457,"uuid":"233593328","full_name":"drupaltest/behat-one-time-login","owner":"drupaltest","description":"Authenticates users through the Drupal one time login mechanism in Behat scenarios","archived":false,"fork":false,"pushed_at":"2023-12-14T11:08:43.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-14T00:38:41.087Z","etag":null,"topics":["behat","drupal"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drupaltest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-13T12:44:40.000Z","updated_at":"2022-12-16T09:43:07.000Z","dependencies_parsed_at":"2023-12-14T12:27:23.122Z","dependency_job_id":"0a952952-eb91-4bce-b64b-687db253fc71","html_url":"https://github.com/drupaltest/behat-one-time-login","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.25,"last_synced_commit":"f6f9b6ced603e558e17d80f49c72ebd896c13e87"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/drupaltest/behat-one-time-login","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupaltest%2Fbehat-one-time-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupaltest%2Fbehat-one-time-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupaltest%2Fbehat-one-time-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupaltest%2Fbehat-one-time-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drupaltest","download_url":"https://codeload.github.com/drupaltest/behat-one-time-login/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupaltest%2Fbehat-one-time-login/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28756442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["behat","drupal"],"created_at":"2024-09-27T10:41:09.441Z","updated_at":"2026-01-25T18:34:01.937Z","avatar_url":"https://github.com/drupaltest.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Behat One Time Login\n====================\n\nAuthenticates users through the Drupal one time login mechanism in Behat\nscenarios.\n\nThis is intended for projects that do not use the default Drupal login form but\ninstead rely on 2-Factor Authentication, Single Sign On or other non-standard\nauthentication methods.\n\n\nInstallation\n------------\n\nAdd the library to your development dependencies:\n\n```\n$ composer require --dev drupaltest/behat-one-time-login\n```\n\nAdd the following to your `behat.yml` configuration file:\n\n```\ndefault:\n  extensions:\n    FriendsOfBehat\\ServiceContainerExtension:\n      imports:\n        - \"./vendor/drupaltest/behat-one-time-login/behat.services.yml\"\n```\n\n\nUsage\n-----\n\nThis transparently replaces the standard login method, so in most cases it can\nbe dropped in and used without requiring changes to existing test scenarios.\n\nDo note that in the standard Drupal login procedure the user ends up on the\nhomepage after logging in, and with this library they end up on the user profile\npage. We do not include a redirection to the homepage since in Behavior Driven\nDevelopment the tests are supposed to be readable by business stakeholders. Non-\ntechnical users might not know that Drupal internally redirects to the homepage\nafter logging in. This means that any tests that are performing actions on the\nhomepage should have a step telling the user to open the homepage. For example:\n\n```\nGiven I am logged in as an administrator\nAnd I am on the homepage\n```\n\n\nDevelopment\n-----------\n\nRunning tests locally:\n\n* Run `composer install` to get the codebase:\n  ```bash\n  $ composer install\n  ```\n* Create a customized `behat.yml`:\n  ```bash\n  $ cp behat.yml.dist behat.yml\n  ```\n* Adapt the values in `behat.yml` to your needs. You can keep the default Behat\n  config and test using the PHP built-in web-server:\n  ```bash\n  $ ./vendor/bin/drush runserver 8888\n  ```\n  or use your local web-server if any. In this case, you'll need to set the\n  appropriate configurations in `behat.yml`.\n* Install Drupal:\n  ```bash\n  $ ./vendor/bin/drush site-install\n  ```\n* Run tests:\n ```bash\n $ ./vendor/bin/behat\n ```\n\n\n Credits\n -------\n\n This is based on [weitzman/logintrait](https://gitlab.com/weitzman/logintrait/)\n by Moshe Weitzman.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupaltest%2Fbehat-one-time-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrupaltest%2Fbehat-one-time-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupaltest%2Fbehat-one-time-login/lists"}