Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update version and add additional info fields

  • Loading branch information...
commit 84435412f46c98c4051e52621a844e51770f978e 1 parent 3c47579
Michael fairchild authored
2  lib/omniauth-att/version.rb
... ... @@ -1,5 +1,5 @@
1 1 module OmniAuth
2 2 module ATT
3   - VERSION = "0.4"
  3 + VERSION = "0.5"
4 4 end
5 5 end
28 lib/omniauth/strategies/att.rb
@@ -13,10 +13,10 @@ class Att < OmniAuth::Strategies::OAuth2
13 13 option :name, "att"
14 14
15 15 option :client_options, {
16   - :site => ENV['ATT_BASE_DOMAIN'] || 'https://auth.tfoundry.com',
17   - :authorize_url => '/oauth/authorize',
18   - :token_url => '/oauth/token.json',
19   - :raise_errors => false
  16 + :site => ENV['ATT_BASE_DOMAIN'] || 'https://auth.tfoundry.com',
  17 + :authorize_url => '/oauth/authorize',
  18 + :token_url => '/oauth/token.json',
  19 + :raise_errors => true
20 20 }
21 21
22 22 option :token_params, {
@@ -28,14 +28,16 @@ class Att < OmniAuth::Strategies::OAuth2
28 28
29 29 info do
30 30 prune!({
31   - :name => raw_info['info']['name'],
32   - :email => raw_info['info']['email']
  31 + :name => raw_info['info']['name'],
  32 + :email => raw_info['info']['email'],
  33 + :first_name => raw_info['info']['first_name'],
  34 + :last_name => raw_info['info']['last_name']
33 35 })
34 36 end
35 37
36 38 extra do
37 39 {
38   - 'raw_info' => prune!(raw_info['info'])
  40 + 'raw_info' => prune!(raw_info)
39 41 }
40 42 end
41 43
@@ -51,11 +53,11 @@ def full_host
51 53 ENV['RACK_ENV'] == 'production' ? super.gsub('http:', 'https:') : super
52 54 end
53 55
54   - # def request_phase
55   - # options[:scope] ||= 'profile'
56   - # options[:authorize_params][:response_type] ||= 'code'
57   - # super
58   - # end
  56 + def request_phase
  57 + # options[:scope] ||= 'profile'
  58 + options[:authorize_params][:response_type] ||= 'code'
  59 + super
  60 + end
59 61
60 62 def raw_info
61 63 @raw_info ||= access_token.get('/me.json').parsed
@@ -75,4 +77,4 @@ def prune!(hash)
75 77 end
76 78
77 79
78   -OmniAuth.config.add_camelization 'att', 'Att'
  80 +OmniAuth.config.add_camelization 'att', 'Att'
8 omniauth-att.gemspec
@@ -5,8 +5,8 @@ require "omniauth-att/version"
5 5 Gem::Specification.new do |s|
6 6 s.name = "omniauth-att"
7 7 s.version = OmniAuth::ATT::VERSION
8   - s.authors = ["Ari Lerner"]
9   - s.email = ["arilerner@mac.com"]
  8 + s.authors = ["Ari Lerner", "Michael Fairchild"]
  9 + s.email = ["arilerner@mac.com", "mfairchild@tfoundry.com"]
10 10 s.homepage = ""
11 11 s.summary = %q{OmniAuth extension to use AT&T accounts}
12 12 s.description = %q{Use this OmniAuth to connect to the AT&T Foundry identity services}
@@ -24,11 +24,11 @@ Gem::Specification.new do |s|
24 24 s.add_dependency 'activesupport'
25 25 s.add_dependency 'i18n'
26 26
27   - %w(sinatra thin omniauth-github omniauth-facebook omniauth-twitter).each do |gem|
  27 + %w(sinatra thin omniauth omniauth-oauth2).each do |gem|
28 28 s.add_runtime_dependency gem
29 29 end
30 30
31   - %w(shotgun heroku).each do |gem|
  31 + %w(shotgun heroku omniauth-github omniauth-facebook omniauth-twitter).each do |gem|
32 32 s.add_development_dependency gem
33 33 end
34 34 # s.add_development_dependency "rspec"

0 comments on commit 8443541

Please sign in to comment.
Something went wrong with that request. Please try again.