class Net::SMTP::AuthXoauth2 - net-smtp: Ruby Standard Library Documentation

# class Net::SMTP::AuthXoauth2

### Public Instance Methods

auth(user, secret) click to toggle source

    # File net-smtp-0.5.0/lib/net/smtp/auth_xoauth2.rb, line 5
    def auth(user, secret)
      token = xoauth2_string(user, secret)

      finish("AUTH XOAUTH2 #{base64_encode(token)}")
    end

### Private Instance Methods

xoauth2_string(user, secret) click to toggle source

    # File net-smtp-0.5.0/lib/net/smtp/auth_xoauth2.rb, line 13
    def xoauth2_string(user, secret)
      "user=#{user}\1auth=Bearer #{secret}\1\1"
    end