OpenQuizz
Une application de gestion des contenus pédagogiques
Unauthorized Class Reference
Inheritance diagram for Unauthorized:
Collaboration diagram for Unauthorized:

Public Member Functions

def __init__ (self, description=None, response=None, www_authenticate=None)
 
def get_headers (self, environ=None)
 
- Public Member Functions inherited from HTTPException
def __init__ (self, description=None, response=None)
 
def wrap (cls, exception, name=None)
 
def name (self)
 
def get_description (self, environ=None)
 
def get_body (self, environ=None)
 
def get_response (self, environ=None)
 
def __call__ (self, environ, start_response)
 
def __str__ (self)
 
def __repr__ (self)
 

Data Fields

 www_authenticate
 
- Data Fields inherited from HTTPException
 response
 

Static Public Attributes

 code
 
 description
 
- Static Public Attributes inherited from HTTPException
 code
 
 description
 

Detailed Description

*401* ``Unauthorized``

Raise if the user is not authorized to access a resource.

The ``www_authenticate`` argument should be used to set the
``WWW-Authenticate`` header. This is used for HTTP basic auth and
other schemes. Use :class:`~werkzeug.datastructures.WWWAuthenticate`
to create correctly formatted values. Strictly speaking a 401
response is invalid if it doesn't provide at least one value for
this header, although real clients typically don't care.

:param description: Override the default message used for the body
    of the response.
:param www-authenticate: A single value, or list of values, for the
    WWW-Authenticate header.

.. versionchanged:: 0.15.3
    If the ``www_authenticate`` argument is not set, the
    ``WWW-Authenticate`` header is not set.

.. versionchanged:: 0.15.3
    The ``response`` argument was restored.

.. versionchanged:: 0.15.1
    ``description`` was moved back as the first argument, restoring
     its previous position.

.. versionchanged:: 0.15.0
    ``www_authenticate`` was added as the first argument, ahead of
    ``description``.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  description = None,
  response = None,
  www_authenticate = None 
)

Member Function Documentation

◆ get_headers()

def get_headers (   self,
  environ = None 
)
Get a list of headers.

Reimplemented from HTTPException.

Field Documentation

◆ code

code
static

◆ description

description
static

◆ www_authenticate

www_authenticate

The documentation for this class was generated from the following file: