Class: Tweetwine::OAuth
- Inherits:
-
Object
- Object
- Tweetwine::OAuth
- Defined in:
- lib/tweetwine/oauth.rb
Constant Summary collapse
- SEP =
':'
- CON =
Obfuscate.read(<<-END).split(SEP) enpGfklDSjc7K0s+cklwdipiRiY6cGk8J0U5diFfZHh0JzxnfD5lPzxJcXN6 PitkPXNhYGh7M194Qyc2PHgrRkdn END
Instance Method Summary collapse
- #authorize {|obfuscate_access_token| ... } ⇒ Object
-
#initialize(access = nil) ⇒ OAuth
constructor
A new instance of OAuth.
- #request_signer ⇒ Object
Constructor Details
Instance Method Details
#authorize {|obfuscate_access_token| ... } ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/tweetwine/oauth.rb', line 22 def request_token = get_request_token CLI.ui.info "Please authorize: #{request_token.}" pin = CLI.ui.prompt 'Enter PIN' access_token = get_access_token(request_token, pin) reset_access_token(access_token) yield(obfuscate_access_token) if block_given? end |
#request_signer ⇒ Object
31 32 33 34 35 |
# File 'lib/tweetwine/oauth.rb', line 31 def request_signer @signer ||= lambda do |connection, request| request.oauth! connection, consumer, access_token end end |