271c51d Fix inconsistencies in session auth failures

Authored and Committed by jjongsma 8 years ago
    Fix inconsistencies in session auth failures
    
    The spice session implementation can retry authentication on its own,
    whereas the vnc session needs to tear down the session and re-connect in
    order to retry a failed authentication. This results in the following
    inconsistent behavior:
    
    VNC session:
     - emits a 'session-auth-failed' signal when the client does not support
       a particular authentication type (i.e.: a non-recoverable error)
    Spice session:
    - emits a 'session-auth-failed' signal when user enters an incorrect
      password, and immediately retries auth internally
    
    VNC session:
     - emits a 'session-auth-refused' error when user enters an invalid
       password (i.e.: a recoverable error)
    Spice Session:
    - never emits a 'session-auth-refused' signal
    
    Because of these differences, the VirtViewerApp code to handle authentication
    failures is a bit confusing and difficult to maintain. To fix this issue, make
    both the spice and VNC sessions emit the same signal when similar errors occur.
    We use the new session API added in the last commit to determine whether the
    session supports automatic retries so we know how to handle the signal.
    
        
file modified
+10 -2