This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ public function getDependencies() : array
29
29
'aliases ' => [
30
30
// Change the alias value for Authentication adapter and
31
31
// UserRepository adapter
32
- // AuthenticationInterface::class => Adapter\BasicAccess::class,
33
- // UserRepositoryInterface::class => UserRepository\Htpasswd::class
32
+ AuthenticationInterface::class => Adapter \BasicAccess::class,
33
+ UserRepositoryInterface::class => UserRepository \Htpasswd::class
34
34
],
35
35
'factories ' => [
36
36
AuthenticationMiddleware::class => AuthenticationMiddlewareFactory::class,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class HtpasswdFactory
14
14
{
15
15
public function __invoke (ContainerInterface $ container ) : Htpasswd
16
16
{
17
- $ htpasswd = $ container ->get ('config ' )['user_repository ' ]['htpasswd ' ] ?? null ;
17
+ $ htpasswd = $ container ->get ('config ' )['authentication ' ]['htpasswd ' ] ?? null ;
18
18
if (null === $ htpasswd ) {
19
19
throw new Exception \InvalidConfigException (
20
20
'Htpasswd file name is not present in user_register config '
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class PdoDatabaseFactory
15
15
{
16
16
public function __invoke (ContainerInterface $ container ) : PdoDatabase
17
17
{
18
- $ pdo = $ container ->get ('config ' )['user_repository ' ]['pdo ' ] ?? null ;
18
+ $ pdo = $ container ->get ('config ' )['authentication ' ]['pdo ' ] ?? null ;
19
19
if (null === $ pdo ) {
20
20
throw new Exception \InvalidConfigException (
21
21
'PDO values are missing in user_register config '
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public function testInvokeWithEmptyConfig()
35
35
public function testInvokeWithInvalidConfig ()
36
36
{
37
37
$ this ->container ->get ('config ' )->willReturn ([
38
- 'user_repository ' => [
38
+ 'authentication ' => [
39
39
'htpasswd ' => 'foo '
40
40
]
41
41
]);
@@ -45,7 +45,7 @@ public function testInvokeWithInvalidConfig()
45
45
public function testInvokeWithValidConfig ()
46
46
{
47
47
$ this ->container ->get ('config ' )->willReturn ([
48
- 'user_repository ' => [
48
+ 'authentication ' => [
49
49
'htpasswd ' => __DIR__ . '/../TestAssets/htpasswd '
50
50
]
51
51
]);
Original file line number Diff line number Diff line change @@ -62,15 +62,15 @@ public function getPdoConfig()
62
62
public function testInvokeWithInvalidConfig ($ pdoConfig )
63
63
{
64
64
$ this ->container ->get ('config ' )->willReturn ([
65
- 'user_repository ' => [ 'pdo ' => $ pdoConfig ]
65
+ 'authentication ' => [ 'pdo ' => $ pdoConfig ]
66
66
]);
67
67
$ pdoDatabase = ($ this ->factory )($ this ->container ->reveal ());
68
68
}
69
69
70
70
public function testInvokeWithValidConfig ()
71
71
{
72
72
$ this ->container ->get ('config ' )->willReturn ([
73
- 'user_repository ' => [
73
+ 'authentication ' => [
74
74
'pdo ' => [
75
75
'dsn ' => 'sqlite: ' . __DIR__ . '/../TestAssets/pdo.sqlite ' ,
76
76
'table ' => 'user ' ,
You can’t perform that action at this time.
0 commit comments