diff --git a/src/Google2fa.php b/src/Google2fa.php index a2d551c..2e819ee 100644 --- a/src/Google2fa.php +++ b/src/Google2fa.php @@ -20,15 +20,8 @@ public function boot() } /** - * Build the view that renders the navigation links for the tool. - * - * @return \Illuminate\View\View + * @return bool */ - public function renderNavigation() - { - return view('google2fa::navigation'); - } - protected function is2FAValid() { $secret = Request::get('secret'); @@ -42,6 +35,10 @@ protected function is2FAValid() return $google2fa->verifyKey(auth()->user()->user2fa->google2fa_secret, $secret); } + /** + * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\View\View + * @throws \PragmaRX\Google2FA\Exceptions\InsecureCallException + */ public function confirm() { if ($this->is2FAValid()) { @@ -68,6 +65,10 @@ public function confirm() return view('google2fa::register', $data); } + /** + * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View + * @throws \PragmaRX\Google2FA\Exceptions\InsecureCallException + */ public function register() { $google2fa = new G2fa(); @@ -85,6 +86,9 @@ public function register() } + /** + * @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\View\View + */ public function authenticate() { if ($recover = Request::get('recover')) {