Sha256: b678ae060d35781bfbefa25e8e25e73fa4aae4e6614fc29c08651698e1dc4972
Contents?: true
Size: 336 Bytes
Versions: 6
Compression:
Stored size: 336 Bytes
Contents
class Net::SMTP class AuthXoauth2 < Net::SMTP::Authenticator auth_type :xoauth2 def auth(user, secret) token = xoauth2_string(user, secret) finish("AUTH XOAUTH2 #{base64_encode(token)}") end private def xoauth2_string(user, secret) "user=#{user}\1auth=Bearer #{secret}\1\1" end end end
Version data entries
6 entries across 6 versions & 4 rubygems