W3cubDocs

/Symfony 4.1

UnauthorizedHttpException

class UnauthorizedHttpException extends HttpException

Methods

__construct(string $challenge, string $message = null, Exception $previous = null, int|null $code = 0, array $headers = array())
int getStatusCode()

Returns the status code.

from HttpException
array getHeaders()

Returns response headers.

from HttpException
setHeaders(array $headers)

Set response headers.

from HttpException

Details

__construct(string $challenge, string $message = null, Exception $previous = null, int|null $code = 0, array $headers = array())

Parameters

string $challenge WWW-Authenticate challenge string
string $message
Exception $previous
int|null $code
array $headers

int getStatusCode()

Returns the status code.

Return Value

int An HTTP response status code

array getHeaders()

Returns response headers.

Return Value

array Response headers

setHeaders(array $headers)

Set response headers.

Parameters

array $headers Response headers

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.html