1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/net/smtp.rb: support LOGIN authentication. Thanks to Kazuhiko Izawa.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2003-05-24 18:30:05 +00:00
parent 68eaa2864e
commit 254046878a
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sun May 25 03:33:53 2003 Minero Aoki <aamine@loveruby.net>
* lib/net/smtp.rb: support LOGIN authentication. Thanks to
Kazuhiko Izawa.
Tue May 20 00:45:40 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* dir.c (push_braces): do not push_braces() unless rbrace is found.

View file

@ -324,7 +324,6 @@ module Net
}
end
# "PLAIN" authentication [RFC2554]
def auth_plain( user, secret )
atomic {
getok sprintf('AUTH PLAIN %s',
@ -332,7 +331,14 @@ module Net
}
end
# "CRAM-MD5" authentication [RFC2195]
def auth_login(user, secret)
atomic{
getok("AUTH LOGIN", ContinueCode)
getok([user].pack('m').chomp, ContinueCode)
getok([secret].pack('m').chomp)
}
end
def auth_cram_md5( user, secret )
atomic {
rep = getok( 'AUTH CRAM-MD5', ContinueCode )