omniauth-campus 0.2.9 → 0.3.0
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: 6f24efdde589ff6153290a35adf9c013b4d047d3
|
4
|
+
data.tar.gz: 010bfe57393a3b28788a031d0cc9f3eec515f079
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb96d8d7aaa6010a46514f0f6298634c13bfb09ed7465ec34161ceadcb50e6bd6ab5de179057cb4a8800909993a7183de33b43b0933160c10e555c59a4784ee5
|
7
|
+
data.tar.gz: 5ec16a997b1b6eeb75e3626d3629476b9881f5b169dc652a5cdd66f44db8b5e09dad3b0234b9cfb7e8c24fc0366d08ad1146c98969c3f29534b3dad7b98b8e48
|
Binary file
|
@@ -71,6 +71,27 @@ module OmniAuth
|
|
71
71
|
@raw_info ||= MultiJson.decode(access_token.get('')).body
|
72
72
|
end
|
73
73
|
|
74
|
+
def api_uri
|
75
|
+
options.endpoint
|
76
|
+
end
|
77
|
+
|
78
|
+
def authentication_response
|
79
|
+
unless @authentication_response
|
80
|
+
return unless raw_info['name'] && raw_info['email']
|
81
|
+
|
82
|
+
uri = URI(api_uri)
|
83
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
84
|
+
http.use_ssl = true
|
85
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
86
|
+
|
87
|
+
req = Net::HTTP::Get.new(uri.request_uri)
|
88
|
+
req.basic_auth raw_info['name'], raw_info['email']
|
89
|
+
@authentication_response = http.request(req)
|
90
|
+
end
|
91
|
+
|
92
|
+
@authentication_response
|
93
|
+
end
|
94
|
+
|
74
95
|
end
|
75
96
|
end
|
76
97
|
end
|
Binary file
|