Using data in custom filesystem from custom authorizer

57 views
Skip to first unread message

Sami Vuolanne

unread,
Jun 30, 2014, 5:51:05 AM6/30/14
to pyft...@googlegroups.com
Hi!

I have a project where I need to use custom authorizer and custom filesystem. The authorizer will give a token for the user that I need to use when accessing the filesystem functions for that user. All succesful connections will give a different token, regardless if it is the same user or not.

I have not figured out how to do this. Any hints available?

Regards,
Sami Vuolanne

Giampaolo Rodola'

unread,
Jun 30, 2014, 4:34:01 PM6/30/14
to pyft...@googlegroups.com
Hello, 
as of right now this is not possible.
In order to do this validate_authentication() method of the authorizer class should return a value and the handler (FTPHander) should store it as a session attribute.
To me this looks like a reasonable feature request so I will make sure to implement it once I will find some time to do it (which might me someday during this week).


--
You received this message because you are subscribed to the "Python FTP server library" project group:
http://code.google.com/p/pyftpdlib/
To post to this group, send email to pyft...@googlegroups.com
To unsubscribe from this group, send email to pyftpdlib-...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyftpdlib
---
You received this message because you are subscribed to the Google Groups "Python FTP server library - Discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyftpdlib+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

vivek....@students.vnit.ac.in

unread,
Jul 1, 2014, 1:24:35 AM7/1/14
to pyft...@googlegroups.com
Hi,

I don't know if it is correct way or not. But you can override add_user method in authorizer and add a custom field to the dictionary. And later you can access the same dict in handler by self.authorizer.user_table dictionary using key of user and pass it to filesystem. You would also need to override run_as_current_user to do this.

Regards,
Vivek Jhaver
Reply all
Reply to author
Forward
0 new messages