Exemplo n.º 1
0
def missing_auth(handler: ZoeRequestHandler):
    """Sends a 401 response that enables basic auth"""
    handler.set_status(
        401,
        'Could not verify your access level for that URL. You have to login with proper credentials.'
    )
    handler.set_header('WWW-Authenticate', 'Basic realm="Login Required"')
    handler.finish()
Exemplo n.º 2
0
def missing_auth(handler: ZoeRequestHandler):
    """Sends a 401 response that enables basic auth"""
    handler.set_status(401, 'Could not verify your access level for that URL. You have to login with proper credentials.')
    handler.set_header('WWW-Authenticate', 'Basic realm="Login Required"')
    handler.finish()