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

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/net-smtp-0.5.0/lib/net/smtp/auth_xoauth2.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/net-smtp-0.5.0/lib/net/smtp/auth_xoauth2.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/net-smtp-0.5.0/lib/net/smtp/auth_xoauth2.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/net-smtp-0.5.0/lib/net/smtp/auth_xoauth2.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/net-smtp-0.5.0/lib/net/smtp/auth_xoauth2.rb
net-smtp-0.5.0 lib/net/smtp/auth_xoauth2.rb