public function authenticate(array $providers = [])
    {
        // Caught exceptions
        $exceptionStack = [];

        // Spin through each of the registered authentication providers and attempt to
        // authenticate through one of them. This allows a developer to implement
        // and allow a number of different authentication mechanisms.
        foreach ($this->filterProviders($providers) as $provider) {
            try {
                // Authenticate user with current provider
                $user = $provider->authenticate($this->router->getCurrentRequest(), $this->router->getCurrentRoute());

                // Set successful provider
                $this->providerUsed = $provider;

                return $this->user = $user;
            } catch (NodesException $exception) {
                $exceptionStack[] = $exception;
            } catch (UnauthorizedHttpException $exception) {
                $exceptionStack[] = $exception;
            } catch (BadRequestHttpException $exception) {
                // We won't add this exception to the stack as it's thrown when the provider
                // is unable to authenticate due to the correct authorization header not
                // being set. We will throw an exception for this below.
            }
        }

        $this->throwUnauthorizedException($exceptionStack);
    }