Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update version and add additional info fields

  • Loading branch information...
commit 84435412f46c98c4051e52621a844e51770f978e 1 parent 3c47579
@fairchild fairchild authored
View
2  lib/omniauth-att/version.rb
@@ -1,5 +1,5 @@
module OmniAuth
module ATT
- VERSION = "0.4"
+ VERSION = "0.5"
end
end
View
28 lib/omniauth/strategies/att.rb
@@ -13,10 +13,10 @@ class Att < OmniAuth::Strategies::OAuth2
option :name, "att"
option :client_options, {
- :site => ENV['ATT_BASE_DOMAIN'] || 'https://auth.tfoundry.com',
- :authorize_url => '/oauth/authorize',
- :token_url => '/oauth/token.json',
- :raise_errors => false
+ :site => ENV['ATT_BASE_DOMAIN'] || 'https://auth.tfoundry.com',
+ :authorize_url => '/oauth/authorize',
+ :token_url => '/oauth/token.json',
+ :raise_errors => true
}
option :token_params, {
@@ -28,14 +28,16 @@ class Att < OmniAuth::Strategies::OAuth2
info do
prune!({
- :name => raw_info['info']['name'],
- :email => raw_info['info']['email']
+ :name => raw_info['info']['name'],
+ :email => raw_info['info']['email'],
+ :first_name => raw_info['info']['first_name'],
+ :last_name => raw_info['info']['last_name']
})
end
extra do
{
- 'raw_info' => prune!(raw_info['info'])
+ 'raw_info' => prune!(raw_info)
}
end
@@ -51,11 +53,11 @@ def full_host
ENV['RACK_ENV'] == 'production' ? super.gsub('http:', 'https:') : super
end
- # def request_phase
- # options[:scope] ||= 'profile'
- # options[:authorize_params][:response_type] ||= 'code'
- # super
- # end
+ def request_phase
+ # options[:scope] ||= 'profile'
+ options[:authorize_params][:response_type] ||= 'code'
+ super
+ end
def raw_info
@raw_info ||= access_token.get('/me.json').parsed
@@ -75,4 +77,4 @@ def prune!(hash)
end
-OmniAuth.config.add_camelization 'att', 'Att'
+OmniAuth.config.add_camelization 'att', 'Att'
View
8 omniauth-att.gemspec
@@ -5,8 +5,8 @@ require "omniauth-att/version"
Gem::Specification.new do |s|
s.name = "omniauth-att"
s.version = OmniAuth::ATT::VERSION
- s.authors = ["Ari Lerner"]
- s.email = ["arilerner@mac.com"]
+ s.authors = ["Ari Lerner", "Michael Fairchild"]
+ s.email = ["arilerner@mac.com", "mfairchild@tfoundry.com"]
s.homepage = ""
s.summary = %q{OmniAuth extension to use AT&T accounts}
s.description = %q{Use this OmniAuth to connect to the AT&T Foundry identity services}
@@ -24,11 +24,11 @@ Gem::Specification.new do |s|
s.add_dependency 'activesupport'
s.add_dependency 'i18n'
- %w(sinatra thin omniauth-github omniauth-facebook omniauth-twitter).each do |gem|
+ %w(sinatra thin omniauth omniauth-oauth2).each do |gem|
s.add_runtime_dependency gem
end
- %w(shotgun heroku).each do |gem|
+ %w(shotgun heroku omniauth-github omniauth-facebook omniauth-twitter).each do |gem|
s.add_development_dependency gem
end
# s.add_development_dependency "rspec"
Please sign in to comment.
Something went wrong with that request. Please try again.