Re: How to use callbacks for authentication



On Mon, 2006-02-13 at 09:40 -0800, s satterfield wrote:
> Hello everyone,
> 
> I was wondering if anyone has an example on how to use callbacks for
> authentication?  The application I am creating will have the username
> and password and won't need user input, however, I'm not sure if I
> need to use callbacks. And if I do how do I create the callback and
> get it to launch? This application will need to be able to
> authenticate for ftp, sftp, and ssh. I found a sample file transfer
> (text-xfer.c)  that works with file://, but it is getting a
> GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR: Login failed error for
> GNOME_VFS_XFER_CHECKING_DESTINATION for ftp when I include the
> username and password in the URI. When I don't include it the program
> hangs. For sftp and ssh I get  GNOME_VFS_XFER_PROGRESS_STATUS_OK:
> GNOME_VFS_XFER_CHECKING_DESTINATION:
> GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR: Access denied. I'm not sure
> how to get it to log in. Any suggestions? Thank you for your time.

Its strange that it doesn't work when you add the password and username
to the uri. I dunno whats causing that.

For examples on how to use the callbacks, see
libgnomeui/libgnomeui/gnome-authentication-manager.c in gnome cvs.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a witless misogynist matador with acid for blood. She's a violent 
tempestuous traffic cop who hides her beauty behind a pair of thick-framed 
spectacles. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]