コード例 #1
0
 def __init__(self, message=""):
     """
     HttpUnauthorized constructor
     :param message: String, message of the exception. Ie, "Unauthorized access"
     """
     Unauthorized.__init__(self)
     self.description = message
コード例 #2
0
ファイル: challenge.py プロジェクト: WarungData/flask-digest
    def __init__(self, stomach, stale=False):
        Unauthorized.__init__(self)

        realm = stomach.realm
        nonce = stomach.gen_nonce()
        qop = stomach.qop

        self.config = (realm, nonce, [qop], None, 'MD5', stale)
コード例 #3
0
ファイル: exceptions.py プロジェクト: scorelab/OpenMF
 def __init__(
     self,
     description="Unauthorized",
     admin_only=False,
     error=None,
     error_description=None,
 ):
     self.description = description
     self.www_auth_value = self.__get_wwww_auth_value(
         admin_only, error, error_description)
     Unauthorized.__init__(self,
                           description=description,
                           response=None,
                           www_authenticate=None)
コード例 #4
0
 def __init__(self, sync_type):
     Unauthorized.__init__(self)
     self.sync_type = sync_type