class Milkman::Authorizer
Attributes
options[RW]
Public Class Methods
new(attributes)
click to toggle source
# File lib/milkman/authorizer.rb, line 8 def initialize(attributes) @shared_secret = attributes.delete(:shared_secret) @options = attributes.merge! default_options end
Public Instance Methods
Private Instance Methods
frob()
click to toggle source
# File lib/milkman/authorizer.rb, line 32 def frob STDIN.gets.strip end
frob_message_url()
click to toggle source
# File lib/milkman/authorizer.rb, line 36 def frob_message_url authorization_url sign(shared_secret, options.except(:format)) end
response()
click to toggle source
# File lib/milkman/authorizer.rb, line 24 def response @response ||= Milkman::Request.call request_url(signed_options) end
signed_options()
click to toggle source
# File lib/milkman/authorizer.rb, line 28 def signed_options sign shared_secret, options.merge!(method: "rtm.auth.getToken", frob: frob) end