(self, blink, key)
return True
Send 2FA key to blink servers.
Send 2FA key to blink servers.
Send 2FA key to blink servers .
def send_auth_key(self, blink, key):
        """Send 2FA key to blink servers."""
        if key is not None:
            response = api.request_verify(self, blink, key)
            try:
                json_resp = response.json()
                blink.available = json_resp["valid"]
                if not json_resp["valid"]:
                    _LOGGER.error("%s", json_resp["message"])
                    return False
            except (KeyError, TypeError):
                _LOGGER.error("Did not receive valid response from server.")
                return False
        return True
def send_auth_key ( self , blink , key ) : if key is not None : response = api . request_verify ( self , blink , key ) try : json_resp = response . json ( ) blink . available = json_resp [ "valid" ] if not json_resp [ "valid" ] : _LOGGER . error ( "%s" , json_resp [ "message" ] ) return False except ( KeyError , TypeError ) : _LOGGER . error ( "Did not receive valid response from server." ) return False return True