]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/Guards/ExternalBaseSessionGuard.php
Add prev and next button to navigate through different pages
[bookstack] / app / Auth / Access / Guards / ExternalBaseSessionGuard.php
index 3022b7f8e5c083a8bec06a4d9be5abe06a973651..9a0c691c8bbb272301c45bccbf6b7c3739554f84 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace BookStack\Auth\Access\Guards;
 
+use BookStack\Auth\Access\RegistrationService;
 use Illuminate\Auth\GuardHelpers;
 use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
 use Illuminate\Contracts\Auth\StatefulGuard;
@@ -14,8 +15,6 @@ use Illuminate\Contracts\Session\Session;
  * guard with 'remember' functionality removed. Basic auth and event emission
  * has also been removed to keep this simple. Designed to be extended by external
  * Auth Guards.
- *
- * @package Illuminate\Auth
  */
 class ExternalBaseSessionGuard implements StatefulGuard
 {
@@ -51,21 +50,24 @@ class ExternalBaseSessionGuard implements StatefulGuard
      */
     protected $loggedOut = false;
 
+    /**
+     * Service to handle common registration actions.
+     *
+     * @var RegistrationService
+     */
+    protected $registrationService;
+
     /**
      * Create a new authentication guard.
      *
-     * @param  string  $name
-     * @param  \Illuminate\Contracts\Auth\UserProvider  $provider
-     * @param  \Illuminate\Contracts\Session\Session  $session
      * @return void
      */
-    public function __construct($name,
-        UserProvider $provider,
-        Session $session)
+    public function __construct(string $name, UserProvider $provider, Session $session, RegistrationService $registrationService)
     {
         $this->name = $name;
         $this->session = $session;
         $this->provider = $provider;
+        $this->registrationService = $registrationService;
     }
 
     /**