-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imap::client::Client::authenticate: Base64 encode the result of the A… #97
imap::client::Client::authenticate: Base64 encode the result of the A… #97
Conversation
…uthenticator. Fixes issue mattnenterprise#95.
There are already a number of breaking changes pending that are waiting on #69, so I'm not too concerned about 1. As for 2, that's a good question... In some sense, what we want is something that returns |
Hmm, actually, no, that won't work. The way to actually do this is to change the pub trait Authenticator {
type Response: AsRef<[u8]>;
fn process(&self, challenge: &str) -> Self::Response;
} Should we make |
IMAP 4rev1 says:
So I guess we should also change the Tasks for next pull request:
|
Yeah, I think that means we should base64 decode the server challenge before passing it to the |
Awesome, I think we're nearly there! I'd like to request two more relatively straightforward changes:
|
Beautiful, thank you! |
Fixes issue #95.
Please bear with me, I'm only beginning Rust.
I see two issues with this one-liner:
Authenticator::process
returns aString
, it is not possible to submit arbitrary binary data. For fixing thisprocess
would have to return aVec<u8>
. What do you think?