Display the password reset view for the given token.

If no token is present, display the link request form.

@param  string|null $token
@return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
771567
public function showResetForm($token = null)
    {
        $email = request('email');
        $this->showPageBanner = false;

        return $this->view('titan::reset_password', compact('token', 'email'));
    }
1070701
public function showNewPassword($token)
    {
        try {
            $token = decrypt($token);

            [$authorId, $token] = explode('|', $token);

            $author = WinkAuthor::findOrFail($authorId);
        } catch (Throwable $e) {
            return redirect()->route('wink.password.forgot')->with('invalidResetToken', true);
        }

        if (cache('password.reset.'.$authorId) != $token) {
            return redirect()->route('wink.password.forgot')->with('invalidResetToken', true);
        }

        cache()->forget('password.reset.'.$authorId);

        $author->password = \Hash::make($password = Str::random());

        $author->save();

        return view('wink::reset-password', [
            'password' => $password,
        ]);
    }
23063
public function resetPassword()
    {
        $this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
        $this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
        $this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
        $this->post('password/reset', 'Auth\ResetPasswordController@reset')->name('password.update');
    }
1004684
public function setToken($token)
    {
        $this->_tokenString = (string) $token;
        $this->_token       = $token;
        return $this;
    }
1154350
public function activate($token = null)
    {
        $activated = false;
        if ($token === null) {
            $this->redirect('/');
        }

        $this->loadModel('User.Users');
        $user = $this->Users
            ->find()
            ->select(['id', 'name', 'token'])
            ->where(['status' => 0, 'token' => $token])
            ->limit(1)
            ->first();

        if ($user) {
            if ($this->Users->updateAll(['status' => 1], ['id' => $user->id])) {
                NotificationManager::activated($user)->send();
                $activated = true;
                $this->Flash->success(__d('user', 'Account successfully activated.'), ['key' => 'activate']);
            } else {
                $this->Flash->danger(__d('user', 'Account could not be activated, please try again later.'), ['key' => 'activate']);
            }
        } else {
            $this->Flash->warning(__d('user', 'Account not found or is already active.'), ['key' => 'activate']);
        }

        $this->title(__d('user', 'Account Activation'));
        $this->set(compact('activated', 'token'));
    }
1004637
protected function _get($token = null)
    {
        $token = $this->_token($token);

        $subject = $this->_subject([
            'success' => true,
            'entity' => $this->_table()->newEntity(),
            'token' => $token
        ]);

        $this->_trigger('beforeRender', $subject);
    }
799344
public function authenticatedChannel($token = null)
    {
        $token = $this->getToken();

        $request = $this->createRequest('GET', config('twitch-api.api_url') . '/kraken/channel', $token);

        $channelInfo = $this->client->send($request);

        return $channelInfo->json();
    }
1154352
public function showResetForm(Request $request, $token = null)
    {
        $data = new PasswordResetData();
        $data->setToken($token);

        $form = $this->form(new PasswordResetForm($data));

        return view('auth.passwords.reset')->with([
            'form' => $form
        ]);
    }
990937
public function getReset($token = null) {
        if (is_null($token))
        {
            throw new NotFoundHttpException;
        }

        //return view('usermanagement::auth.reset')->with('token', $token);
        return view('usermanagement::frontend.'.$this->frontend_template_name.'.password.reset', [
            'title' => 'Reset Password',
            'token' => $token,
        ]);
    }
3031
public function setToken($token = null)
    {
        if (isset($token)) {
            return $this->token = $token;
        }

        return $this->token = gplcart_string_encode(crypt(session_id(), $this->config->getKey()));
    }
199410
public function activate($token)
    {
        if ($this->service->activateUser($token)) {
            return redirect('dashboard')->with('message', 'Your account was activated');
        }

        return view('auth.activate.email')->withErrors(['Could not validate your token']);
    }
380569
public function url_for_token($token)
  {
      $redirect_url = $this->is_test() ? self::TEST_REDIRECT_URL : self::LIVE_REDIRECT_URL;

      return $redirect_url.$token;
  }
1197389
public function getToken($token = null)
    {
        if ($token != null) {

            return $token;
        }

        if ($this->token == null) {

            throw new RequestRequiresAuthenticationException();
        }

        return $this->token;
    }
564287
public function setPasswordResetToken($token = '')
    {
        if (empty($this->passwordResetTokenAttribute) || !is_string($this->passwordResetTokenAttribute)) {
            return null;
        }
        return $this->{$this->passwordResetTokenAttribute} = $token;
    }
931210
public function show($token)
    {
        $memberInvitation = MemberInvitation::where('token', $token)->first();
        if (empty($memberInvitation)) {
            return view('combine::response.member-invitation.not-found');
        }
        switch ($memberInvitation->member->user->status) {
            case 'Invited':
                return $this->respondAcceptNewUser($memberInvitation);
            case 'Accepted':
                return $this->respondOnboardNewUser($memberInvitation);
            default:
                return $this->respondAcceptExistingUser($memberInvitation);
        }
    }
1371277
public function resetPassword($token, $password)
    {
        $this->cleanResetTokens = true;

        /** @var PasswordResetToken $token */
        $token = $this->getEntityManager()->find(PasswordResetToken::class, $token);

        if (!$token) {
            throw new TokenNotFoundException;
        }

        $user = $token->getUser();
        $user->setPassword($password);

        $em = $this->getEntityManager();
        $em->remove($token);
        $em->flush();

        return $user;
    }
716251
public function setBearerToken(string $token): Client
    {
        $this->authenticate($token, null, self::AUTH_BEARER);

        return $this;
    }