omniauth-campus 0.4.2 → 0.4.3

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: 6cff365a72d4b71874f0c70b0395f0892d0745cb
4
- data.tar.gz: 1e04a85e47427db455a820d20e73bf74a4c7a2b2
3
+ metadata.gz: b1726e6b57bfb76dc3b9894c66ff8451a264f2f0
4
+ data.tar.gz: 52b601ba06cce54555128ae20d3391b75a049675
5
5
  SHA512:
6
- metadata.gz: 92b777d8e7e1125e6a639512751a23faabdd6d74c49f71ff71514f5479c2dd67f4903709c6964292fab71f3a070e0a46087ab60750d4e6cc0950ad7820eb09a1
7
- data.tar.gz: b15924ff365ab2664956715fe4b33597584aa5503ea7d7318433e01d45c6e15db75f38a5f53de5e7638b3f52f6574b128265d283d71f23e39f381389b7dd8a2c
6
+ metadata.gz: 50a180b57aa1e1210f505b1289c039b43025d229a604a46aca61543f60981e91f54ddedecfb7e535bf9f573d7abbc21c400aabe045328654a21ae1aa2ecc1037
7
+ data.tar.gz: dcd3ae45d47fcefcb68fc76fa1901022ae366a1fd9065d628be707dbe646b0e5ce872a7217d068cd05c145ffff8db2f62467c4ddfd46a58136513dc3edac2b67
Binary file
@@ -30,6 +30,12 @@ module OmniAuth
30
30
 
31
31
  attr_accessor :access_token
32
32
 
33
+ def request_phase
34
+ response = Rack::Response.new
35
+ response.redirect(options.endpoint)
36
+ response.finish
37
+ end
38
+
33
39
 
34
40
 
35
41
  #site' 'http://community3dev.devcloud.acquia-sites.com/api'
@@ -43,20 +49,7 @@ module OmniAuth
43
49
  #
44
50
  #
45
51
 
46
- def request_phase
47
- form = OmniAuth::Form.new(:title => options.title, :url => callback_path)
48
- options.fields.each do |field|
49
- form.text_field field.to_s.capitalize.gsub("_", " "), field.to_s
50
- end
51
- form.button "Sign In"
52
- form.to_response
53
- end
54
52
 
55
- def callback_phase
56
- return fail!(:invalid_credentials) if !authentication_response
57
- return fail!(:invalid_credentials) if authentication_response.code.to_i >= 400
58
- super
59
- end
60
53
 
61
54
 
62
55
  uid {request['uid']}
@@ -68,27 +61,6 @@ module OmniAuth
68
61
  end
69
62
 
70
63
 
71
- def api_uri
72
- options.endpoint
73
- end
74
-
75
- def authentication_response
76
- unless @authentication_response
77
- return unless request['name'] && request['email']
78
-
79
- uri = URI(api_uri)
80
- http = Net::HTTP.new(uri.host, uri.port)
81
- http.use_ssl = true
82
- http.ssl_version = :SSLv3
83
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER
84
-
85
- req = Net::HTTP::Get.new(uri.request_uri)
86
- req.basic_auth request['name'], request['email']
87
- @authentication_response = http.request(req)
88
- end
89
-
90
- @authentication_response
91
- end
92
64
 
93
65
  end
94
66
  end
Binary file
@@ -1,6 +1,6 @@
1
1
  module Omniauth
2
2
  module Campus
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-campus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - johnvehr