Class: Net::SMTP::AuthXoauth2
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Authenticator
|
|
Instance Chain:
self,
Authenticator
|
|
Inherits: |
Net::SMTP::Authenticator
|
Defined in: | lib/net/smtp/auth_xoauth2.rb |
Class Method Summary
Authenticator
- Inherited
Instance Attribute Summary
Authenticator
- Inherited
Instance Method Summary
Authenticator
- Inherited
Constructor Details
This class inherits a constructor from Net::SMTP::Authenticator
Instance Method Details
#auth(user, secret)
[ GitHub ]# File 'lib/net/smtp/auth_xoauth2.rb', line 5
def auth(user, secret) token = xoauth2_string(user, secret) finish("AUTH XOAUTH2 #{base64_encode(token)}") end
#xoauth2_string(user, secret) (private)
[ GitHub ]# File 'lib/net/smtp/auth_xoauth2.rb', line 13
def xoauth2_string(user, secret) "user=#{user}\1auth=Bearer #{secret}\1\1" end