[virt-tools-list] [PATCH virt-viewer v3 2/2] ovirt: Allow to cancel authentication without showing error dialog

Christophe Fergeau cfergeau at redhat.com
Thu Mar 19 09:42:58 UTC 2015


Hey,

On Thu, Mar 19, 2015 at 04:50:42AM -0400, Pavel Grunt wrote:
> 
> > 
> > So, did you investigate whether it would be possible to modify
> > libgovirt / librest to return a 'CANCELLED' error status (or similar)
> > from ovirt_proxy_fetch_api() so that we don't need to track this
> > ourselves with an extra struct? That seems like a cleaner long-term
> > solution.
> > 
> > But this patch is fine for the current behavior. ACK.
> > 
> > Jonathon
> > 
> 
> I should have mentioned in the patch:
> 
> According to [1] the "authenticate" signal returns FALSE when credentials are not set, returns TRUE when they are set, I don't see a way how to "forward" info why they weren't set.
> However the "CANCELLED" error exists in librest [2] so maybe implementing new signal / api in librest and handling REST_PROXY_ERROR_CANCELLED in libgovirt is possible solution
> 
> [1] https://developer.gnome.org/rest/0.7/RestProxy.html#RestProxy-authenticate
> [2] https://developer.gnome.org/rest/0.7/RestProxy.html#REST-PROXY-ERROR:CAPS

librest merely wraps
https://developer.gnome.org/libsoup/stable/SoupSession.html#SoupSession-authenticate
It seems with libsoup, one would be able to use
soup_session_cancel_message() from the authenticate callback to return
an error code:
https://developer.gnome.org/libsoup/stable/SoupSession.html#soup-session-cancel-message

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20150319/ec5ef19e/attachment.sig>


More information about the virt-tools-list mailing list