1
1
<?php namespace Jenssegers \Mongodb \Auth ;
2
2
3
- use Jenssegers \ Mongodb \ Auth \DatabaseTokenRepository as DbRepository ;
3
+ use Illuminate \ Auth \Passwords \ PasswordResetServiceProvider as BasePasswordResetServiceProvider ;
4
4
5
- class PasswordResetServiceProvider extends \ Illuminate \ Auth \ Passwords \PasswordResetServiceProvider
5
+ class PasswordResetServiceProvider extends BasePasswordResetServiceProvider
6
6
{
7
7
/**
8
8
* Register the token repository implementation.
@@ -18,10 +18,28 @@ protected function registerTokenRepository()
18
18
// interface, and is responsible for the actual storing of auth tokens and
19
19
// their e-mail addresses. We will inject this table and hash key to it.
20
20
$ table = $ app ['config ' ]['auth.password.table ' ];
21
+
21
22
$ key = $ app ['config ' ]['app.key ' ];
23
+
22
24
$ expire = $ app ['config ' ]->get ('auth.password.expire ' , 60 );
23
25
24
- return new DbRepository ($ connection , $ table , $ key , $ expire );
26
+ return new DatabaseTokenRepository ($ connection , $ table , $ key , $ expire );
27
+ });
28
+ }
29
+
30
+ /**
31
+ * Register the password broker instance.
32
+ *
33
+ * @return void
34
+ */
35
+ protected function registerPasswordBroker ()
36
+ {
37
+ $ this ->app ->singleton ('auth.password ' , function ($ app ) {
38
+ return new PasswordBrokerManager ($ app );
39
+ });
40
+
41
+ $ this ->app ->bind ('auth.password.broker ' , function ($ app ) {
42
+ return $ app ->make ('auth.password ' )->broker ();
25
43
});
26
44
}
27
45
}
0 commit comments