class Gigawatt::OAuth
Public Class Methods
client()
click to toggle source
# File lib/gigawatt/oauth.rb, line 3 def self.client if ENV['ENV'] == 'development' client = OAuth2::Client.new('NjtVKz6Di3ccJjn2AGwZKhSxYBX4QHPJ5w1LrZOR', nil, :site => 'http://localhost:3000') else client = OAuth2::Client.new('hhWZrEF6YTlPUKrggiesnjXAFViLa8FBZNNUtr8L', nil, :site => 'https://88miles.net') end end
redirect_uri()
click to toggle source
# File lib/gigawatt/oauth.rb, line 15 def self.redirect_uri if ENV['ENV'] == 'development' "http://localhost:3000/oauth/authorized" else "https://88miles.net/oauth/authorized" end end
token(token)
click to toggle source
# File lib/gigawatt/oauth.rb, line 11 def self.token(token) OAuth2::AccessToken.new(self.client, token) end