Exemplo n.º 1
0
def connection_callback():
    log("Received connection notification")
    if wlan.has_airbears():
        log("Connected to AirBears")
        if not NO_UI:
            tb.notice("Logging in...")
        success = auth.authenticate_from_file()
        if not NO_UI:
            if success: 
                tb.notice("Connected and logged in to AirBears!")
            else:
                tb.notice("Login failed")
    else:
        log("Connected to not-AirBears, ignoring...")
Exemplo n.º 2
0
def connection_callback():
    log("Received connection notification")
    if wlan.has_airbears():
        log("Connected to AirBears")
        if not NO_UI:
            tb.notice("Logging in...")
        success = auth.authenticate_from_file()
        if not NO_UI:
            if success:
                tb.notice("Connected and logged in to AirBears!")
            else:
                tb.notice("Login failed")
    else:
        log("Connected to not-AirBears, ignoring...")
Exemplo n.º 3
0
 def onForceReauthRequest(self, event):
     auth.authenticate_from_file()