Sha256: b678ae060d35781bfbefa25e8e25e73fa4aae4e6614fc29c08651698e1dc4972

Contents?: true

Size: 336 Bytes

Versions: 9

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

9 entries across 8 versions & 6 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/net-smtp-0.5.0/lib/net/smtp/auth_xoauth2.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/net-smtp-0.5.0/lib/net/smtp/auth_xoauth2.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/net-smtp-0.5.0/lib/net/smtp/auth_xoauth2.rb
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