-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #489 from jhedstrom/488-backend-authentication
Authenticate user in the backend bootstrap process on login.
- Loading branch information
Showing
8 changed files
with
173 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@api @d8 | ||
Feature: Backend login/logout | ||
In order to prove that backend authentication is working | ||
As a developer | ||
I need to utilize the backend login functionality of the authentication manager | ||
|
||
Scenario: Log a user in on the backend | ||
Given I am logged in as a user with the "authenticated user" role | ||
Then I should be logged in on the backend | ||
|
||
Scenario: Logout on the backend | ||
Given I am logged in as a user with the "authenticated user" role | ||
And I am logged in on the backend | ||
When I log out | ||
Then I should be logged out on the backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
namespace Drupal; | ||
|
||
use Behat\Testwork\Environment\Environment; | ||
use Drupal\Driver\DriverInterface; | ||
|
||
interface DrupalDriverManagerInterface | ||
{ | ||
/** | ||
* Register a new driver. | ||
* | ||
* @param string $name | ||
* Driver name. | ||
* @param \Drupal\Driver\DriverInterface $driver | ||
* An instance of a DriverInterface. | ||
*/ | ||
public function registerDriver($name, DriverInterface $driver); | ||
|
||
/** | ||
* Return a registered driver by name, or the default driver. | ||
* | ||
* @param string $name | ||
* The name of the driver to return. If omitted the default driver is | ||
* returned. | ||
* | ||
* @return \Drupal\Driver\DriverInterface | ||
* The requested driver. | ||
* | ||
* @throws \InvalidArgumentException | ||
* Thrown when the requested driver is not registered. | ||
*/ | ||
public function getDriver($name = null); | ||
|
||
/** | ||
* Set the default driver name. | ||
* | ||
* @param string $name | ||
* Default driver name to set. | ||
* | ||
* @throws \InvalidArgumentException | ||
* Thrown when the driver is not registered. | ||
*/ | ||
public function setDefaultDriverName($name); | ||
|
||
/** | ||
* Returns all registered drivers. | ||
* | ||
* @return \Drupal\Driver\DriverInterface[] | ||
* An array of drivers. | ||
*/ | ||
public function getDrivers(); | ||
|
||
/** | ||
* Sets the Behat Environment. | ||
* | ||
* @param \Behat\Testwork\Environment\Environment $environment | ||
* The Behat Environment to set. | ||
*/ | ||
public function setEnvironment(Environment $environment); | ||
|
||
/** | ||
* Returns the Behat Environment. | ||
* | ||
* @return \Behat\Testwork\Environment\Environment | ||
* The Behat Environment. | ||
*/ | ||
public function getEnvironment(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters