omniauth-campus 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ddfe3d20135729832e7cc2dee0e33d4245b057f
4
- data.tar.gz: a99cb5d8be6cd389f6cc36d2f21531ce5c128482
3
+ metadata.gz: 6fa11a9af12102673b5b804bb7af6d746b873ff3
4
+ data.tar.gz: 545c3029d539d27b737c64daf0b815028fc4f44e
5
5
  SHA512:
6
- metadata.gz: 96ccce6d4e2700f40376e988af2d120bf28b978cdf80f8d0851fc7c3b49d9d8cb5cc8f3aeb9c11951ed69d1b526b9e0e90f90e1aa949720b5ff5e9f49ac8b405
7
- data.tar.gz: d162172efd2234e981c02700a596cba12131009d68aa1f8a2d8f7a0be027c61104c0b0e976debdfe0e71c2e8fc33ea0b3b7f4af392e609ad1f85528530308677
6
+ metadata.gz: 6739f2589ffe1778c38d6f6d40df3d83ca85be1d7439d1c3c1d1aa556c786c052eb57f16d8eba9a575410405259fff554490daf13c6b22641b59c6512ae95fa3
7
+ data.tar.gz: 58dc91e91bf34ffc10cf4ab57cd78b5a7ee2e19291e0330400fba86f88a302e2897c2c63c24ec77e30c049812a3dd51e6ce7fc78117bae821fc209673143c315
@@ -1,6 +1,6 @@
1
1
  module Omniauth
2
2
  module Campus
3
- VERSION = "0.9.1"
3
+ VERSION = "0.9.2"
4
4
  end
5
5
  end
6
6
 
@@ -1,19 +1,28 @@
1
- require 'omniauth-oauth2'
2
- require 'rack/utils'
1
+ require 'omniauth-oauth'
3
2
  require 'multi_json'
4
- require 'oauth'
5
3
 
6
4
  module OmniAuth
7
5
  module Strategies
8
- class Campus < OmniAuth::Strategies::OAuth2
9
- option :name, 'campus'
6
+ Class Campus < OmniAuth::Strategies::OAuth
7
+ option :name, :campus
8
+
10
9
  option :client_options, {
11
- :site => 'https://dev-oauth-test.gotpantheon.com/myawesomejson',
12
- :authorize_url => '/oauth/authorize',
13
- :token_url => '/oauth/access_token'
14
- }
10
+ :site => "http://dev-oauth-test.gotpantheon.com"
11
+ }
12
+
13
+ uid do
14
+ raw_info[0]['uid']
15
+ end
15
16
 
17
+ info do
18
+ {
19
+ :name => raw_info[0]['users_name'],
20
+ :email => raw_info[0]['users_mail']
21
+ }
22
+ end
16
23
 
17
- end
24
+ def raw_info
25
+ @raw_info ||= MultiJson.decode(access_token.get("http://dev-oauth-test.gotpantheon.com/newauth/api/user_info.json").body)
26
+ end
18
27
  end
19
28
  end
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
23
  #spec.add_runtime_dependency 'omniauth-oauth', '~> 1.0'
24
- spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.1', '>= 1.1.1'
24
+ spec.add_runtime_dependency 'omniauth-oauth', '~> 1.1', '>= 1.1.1'
25
25
  spec.add_runtime_dependency 'oauth'
26
26
  #spec.add_dependency 'oauth2', '~> 0.8.0'
27
27
  spec.add_dependency 'faraday', ['>= 0.8', '<0.10']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-campus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - johnvehr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: omniauth-oauth2
42
+ name: omniauth-oauth
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ~>