omniauth-campus 0.9.2 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11d76f850d83a2c32e4029f8deee0183beaa763d
|
4
|
+
data.tar.gz: 5108dbbd16f99e2f2d47c967d40075617eda4b84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20c186d4867f97d23297ba00d3caf5f5c7844e92aedf8c3b1a0faf5c2399be6f67ee5b960bb08b9eddf461c2e2104152f27026adff5276f47f4e2fd85ec16724
|
7
|
+
data.tar.gz: 71bf53dee42371cc8fd925cfa69b5a8f7316e3a450d69aac62fa54512568a83333abf828aa3cac2c075b26205ccfb78c7698d045b33b26dd2397455fb95162d5
|
Binary file
|
Binary file
|
@@ -1,28 +1,71 @@
|
|
1
|
-
require '
|
1
|
+
require 'oauth'
|
2
|
+
require 'omniauth'
|
2
3
|
require 'multi_json'
|
4
|
+
require 'openssl'
|
5
|
+
require 'uri'
|
6
|
+
#require 'rack/utils'
|
3
7
|
|
4
8
|
module OmniAuth
|
5
9
|
module Strategies
|
6
|
-
|
7
|
-
|
10
|
+
# Your code goes here...
|
11
|
+
class Campus
|
12
|
+
include OmniAuth::Strategy
|
8
13
|
|
9
|
-
option :client_options, {
|
10
|
-
:site => "http://dev-oauth-test.gotpantheon.com"
|
11
|
-
}
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
|
15
|
+
#site: 'http://community3dev.devcloud.acquia-sites.com/api'
|
16
|
+
|
17
|
+
args [:consumer_key, :consumer_secret]
|
18
|
+
option :consumer_key, nil
|
19
|
+
option :consumer_secret, nil
|
20
|
+
|
21
|
+
option :client_options, {:authorize_path => '/oauth/authenticate',
|
22
|
+
:site => 'http://dev-oauth-test.gotpantheon.com/myawesomejson',
|
23
|
+
:proxy => ENV['http_proxy'] ? URI(ENV['http_proxy']) : nil}
|
24
|
+
|
25
|
+
uid { access_token.params[:uid] }
|
16
26
|
|
17
|
-
|
27
|
+
info do
|
18
28
|
{
|
19
|
-
|
20
|
-
|
21
|
-
|
29
|
+
:email => raw_info['email'],
|
30
|
+
:name => raw_info['name'],
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
extra do
|
36
|
+
{ :raw_info => raw_info }
|
22
37
|
end
|
23
38
|
|
24
39
|
def raw_info
|
25
|
-
@raw_info ||= MultiJson.
|
40
|
+
@raw_info ||= MultiJson.load(access_token.get('/1.1/account/verify_credentials.json?include_entities=false&skip_status=true').body)
|
41
|
+
rescue ::Errno::ETIMEDOUT
|
42
|
+
raise ::Timeout::Error
|
43
|
+
end
|
44
|
+
|
45
|
+
alias :old_request_phase :request_phase
|
46
|
+
|
47
|
+
def request_phase
|
48
|
+
%w[force_login lang screen_name].each do |v|
|
49
|
+
if request.params[v]
|
50
|
+
options[:authorize_params][v.to_sym] = request.params[v]
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
%w[x_auth_access_type].each do |v|
|
55
|
+
if request.params[v]
|
56
|
+
options[:request_params][v.to_sym] = request.params[v]
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
if request.params['use_authorize'] == 'true'
|
61
|
+
options[:client_options][:authorize_path] = '/oauth/authorize'
|
62
|
+
else
|
63
|
+
options[:client_options][:authorize_path] = '/oauth/authenticate'
|
64
|
+
end
|
65
|
+
|
66
|
+
old_request_phase
|
67
|
+
end
|
26
68
|
end
|
27
69
|
end
|
28
70
|
end
|
71
|
+
|
Binary file
|
data/omniauth-campus.gemspec
CHANGED
@@ -19,12 +19,9 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
-
spec.add_development_dependency
|
23
|
-
|
24
|
-
spec.add_runtime_dependency '
|
25
|
-
spec.add_runtime_dependency 'oauth'
|
26
|
-
#spec.add_dependency 'oauth2', '~> 0.8.0'
|
22
|
+
spec.add_development_dependency 'rake', '~> 0'
|
23
|
+
spec.add_runtime_dependency 'omniauth', '~> 1.0'
|
24
|
+
spec.add_runtime_dependency 'oauth', '~> 0'
|
27
25
|
spec.add_dependency 'faraday', ['>= 0.8', '<0.10']
|
28
26
|
spec.add_dependency 'multi_json', '~> 1.3'
|
29
|
-
#spec.add_runtime_dependency 'zendesk_api', '> 0.2.2'
|
30
27
|
end
|
metadata
CHANGED
@@ -1,109 +1,103 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-campus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- johnvehr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: omniauth
|
42
|
+
name: omniauth
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
48
|
-
- - '>='
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: 1.1.1
|
47
|
+
version: '1.0'
|
51
48
|
type: :runtime
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
54
51
|
requirements:
|
55
|
-
- - ~>
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '1.1'
|
58
|
-
- - '>='
|
52
|
+
- - "~>"
|
59
53
|
- !ruby/object:Gem::Version
|
60
|
-
version: 1.
|
54
|
+
version: '1.0'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: oauth
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
|
-
- -
|
59
|
+
- - "~>"
|
66
60
|
- !ruby/object:Gem::Version
|
67
61
|
version: '0'
|
68
62
|
type: :runtime
|
69
63
|
prerelease: false
|
70
64
|
version_requirements: !ruby/object:Gem::Requirement
|
71
65
|
requirements:
|
72
|
-
- -
|
66
|
+
- - "~>"
|
73
67
|
- !ruby/object:Gem::Version
|
74
68
|
version: '0'
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
70
|
name: faraday
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
78
72
|
requirements:
|
79
|
-
- -
|
73
|
+
- - ">="
|
80
74
|
- !ruby/object:Gem::Version
|
81
75
|
version: '0.8'
|
82
|
-
- - <
|
76
|
+
- - "<"
|
83
77
|
- !ruby/object:Gem::Version
|
84
78
|
version: '0.10'
|
85
79
|
type: :runtime
|
86
80
|
prerelease: false
|
87
81
|
version_requirements: !ruby/object:Gem::Requirement
|
88
82
|
requirements:
|
89
|
-
- -
|
83
|
+
- - ">="
|
90
84
|
- !ruby/object:Gem::Version
|
91
85
|
version: '0.8'
|
92
|
-
- - <
|
86
|
+
- - "<"
|
93
87
|
- !ruby/object:Gem::Version
|
94
88
|
version: '0.10'
|
95
89
|
- !ruby/object:Gem::Dependency
|
96
90
|
name: multi_json
|
97
91
|
requirement: !ruby/object:Gem::Requirement
|
98
92
|
requirements:
|
99
|
-
- - ~>
|
93
|
+
- - "~>"
|
100
94
|
- !ruby/object:Gem::Version
|
101
95
|
version: '1.3'
|
102
96
|
type: :runtime
|
103
97
|
prerelease: false
|
104
98
|
version_requirements: !ruby/object:Gem::Requirement
|
105
99
|
requirements:
|
106
|
-
- - ~>
|
100
|
+
- - "~>"
|
107
101
|
- !ruby/object:Gem::Version
|
108
102
|
version: '1.3'
|
109
103
|
description: Custom strategy gem for campus app
|
@@ -113,12 +107,12 @@ executables: []
|
|
113
107
|
extensions: []
|
114
108
|
extra_rdoc_files: []
|
115
109
|
files:
|
116
|
-
- .Gemfile.swp
|
117
|
-
- .LICENSE.txt.swp
|
118
|
-
- .README.md.swp
|
119
|
-
- .Rakefile.swp
|
120
|
-
- .gitignore
|
121
|
-
- .omniauth-campus.gemspec.swp
|
110
|
+
- ".Gemfile.swp"
|
111
|
+
- ".LICENSE.txt.swp"
|
112
|
+
- ".README.md.swp"
|
113
|
+
- ".Rakefile.swp"
|
114
|
+
- ".gitignore"
|
115
|
+
- ".omniauth-campus.gemspec.swp"
|
122
116
|
- Gemfile
|
123
117
|
- LICENSE.txt
|
124
118
|
- README.md
|
@@ -141,17 +135,17 @@ require_paths:
|
|
141
135
|
- lib
|
142
136
|
required_ruby_version: !ruby/object:Gem::Requirement
|
143
137
|
requirements:
|
144
|
-
- -
|
138
|
+
- - ">="
|
145
139
|
- !ruby/object:Gem::Version
|
146
140
|
version: '0'
|
147
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
142
|
requirements:
|
149
|
-
- -
|
143
|
+
- - ">="
|
150
144
|
- !ruby/object:Gem::Version
|
151
145
|
version: '0'
|
152
146
|
requirements: []
|
153
147
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.2.
|
148
|
+
rubygems_version: 2.2.1
|
155
149
|
signing_key:
|
156
150
|
specification_version: 4
|
157
151
|
summary: ''
|