You are here

class UnauthorizedHttpException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException

UnauthorizedHttpException.

@author Ben Ramsey <ben@benramsey.com>

Hierarchy

Expanded class hierarchy of UnauthorizedHttpException

2 files declare their use of UnauthorizedHttpException
BasicAuth.php in core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php
Contains \Drupal\basic_auth\Authentication\Provider\BasicAuth.
FlattenExceptionTest.php in vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php

File

vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php, line 19

Namespace

Symfony\Component\HttpKernel\Exception
View source
class UnauthorizedHttpException extends HttpException {

  /**
   * Constructor.
   *
   * @param string     $challenge WWW-Authenticate challenge string
   * @param string     $message   The internal exception message
   * @param \Exception $previous  The previous exception
   * @param int        $code      The internal exception code
   */
  public function __construct($challenge, $message = null, \Exception $previous = null, $code = 0) {
    $headers = array(
      'WWW-Authenticate' => $challenge,
    );
    parent::__construct(401, $message, $previous, $headers, $code);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HttpException::$headers private property
HttpException::$statusCode private property
HttpException::getHeaders public function Returns response headers. Overrides HttpExceptionInterface::getHeaders
HttpException::getStatusCode public function Returns the status code. Overrides HttpExceptionInterface::getStatusCode
UnauthorizedHttpException::__construct public function Constructor. Overrides HttpException::__construct