Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Refactoring / Now xauth doesn't work (tmp key isn't allowed use xauth)

  • Loading branch information...
commit 665415f318edf3c80bd0000ffe44ee65004f9ea6 1 parent 312c643
@sorah sorah authored
Showing with 12 additions and 6 deletions.
  1. +12 −6 lib/termtter/api.rb
View
18 lib/termtter/api.rb
@@ -67,12 +67,18 @@ def try_auth
if File.exist?(File.expand_path("~/.termtter/access_token"))
access_token = File.read(File.expand_path("~/.termtter/access_token")).chomp
else
- access_token = Rubytter::OAuth.new(
- Termtter::Crypt.decrypt(
- "WXxHelB7eWlPVkc1TkVDek9GW3VLRml7TkVDNFBreWlPVkM3TkVDM1B7eWlQ\nbG11S0ZXeU5FQzZQe3lpDFFWbXVLRml6TkVDM097eWlQfGl1S0ZXek5FQzNQ\nVXlpUFZLdUtGaXpORUN6T0ZHdUtGZXxORUN6T1ZuZgw="),
- Termtter::Crypt.decrypt(
- "WXxHeU9reWlQfG11S0ZHeU9reWlPVkd6TkVDek9GV3VLRmV6TkVDek9WaXVL\nRml5TkVDek9GS3VLRm15DE5FQzVPRXlpUHxPdUtGaTdORUN6T1ZXdUtGbTdO\nRUM3UUV5aVBWU3VLRm01TkVDNU9FeWlPVkd6TkVDNAxRVXlpUVZpdUtGV3tO\nRUN6T1ZldUtGR3lPa3lpT1ZHN05FQ3pPVmV1S0ZpN05FQ3pPVlN1S0ZXMk5F\nQzUMUGt5aVB8ZXVLRmUzTkVDek9GR3VLRmUyTkVDek9GT3VLRml6TkVDek9W\nT3VLRkd5T0V5aU9WR3lORUN6DE9WaXVLRm03WlM/Pww=")) \
- .get_access_token_with_xauth(config.user_name, config.password)
+ oa = Rubytter::OAuth.new(
+ Termtter::Crypt.decrypt(
+ ["WXxHelB7eWlPVkc1TkVDek9GW3VLRml7TkVDNFBreWlPVkM3TkVDM1B7eWlQ",
+ "bG11S0ZXeU5FQzZQe3lpDFFWbXVLRml6TkVDM097eWlQfGl1S0ZXek5FQzNQVXlpUFZLdUtGaXpORUN6T0ZHdUtGZXxORUN6T1ZuZgw="].join("\n")),
+ Termtter::Crypt.decrypt(
+ ["WXxHeU9reWlQfG11S0ZHeU9reWlPVkd6TkVDek9GV3VLRmV6TkVDek9WaXVL",
+ "Rml5TkVDek9GS3VLRm15DE5FQzVPRXlpUHxPdUtGaTdORUN6T1ZXdUtGbTdO",
+ "RUM3UUV5aVBWU3VLRm01TkVDNU9FeWlPVkd6TkVDNAxRVXlpUVZpdUtGV3tO",
+ "RUN6T1ZldUtGR3lPa3lpT1ZHN05FQ3pPVmV1S0ZpN05FQ3pPVlN1S0ZXMk5F",
+ "QzUMUGt5aVB8ZXVLRmUzTkVDek9GR3VLRmUyTkVDek9GT3VLRml6TkVDek9W",
+ "T3VLRkd5T0V5aU9WR3lORUN6DE9WaXVLRm03WlM/Pww="].join("\n")))
+ access_token = oa.get_access_token_with_xauth(config.user_name, config.password)
open("~/.termtter/access_token","w"){|f| f.puts access_token }
end
twitter = RubytterProxy.new(access_token, twitter_option)
Please sign in to comment.
Something went wrong with that request. Please try again.