Class: Gigawatt::OAuth
- Inherits:
-
Object
- Object
- Gigawatt::OAuth
- Defined in:
- lib/gigawatt/oauth.rb
Class Method Summary collapse
Class Method Details
.client ⇒ Object
3 4 5 6 7 8 9 |
# 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 ⇒ Object
15 16 17 18 19 20 21 |
# 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) ⇒ Object
11 12 13 |
# File 'lib/gigawatt/oauth.rb', line 11 def self.token(token) OAuth2::AccessToken.new(self.client, token) end |