omniauth-campus 0.5.6 → 0.5.7

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: a63acb39e0fcc43440067bc306273168f201c7c7
4
- data.tar.gz: 7f1958372a9c80e330e3e538b9e8204021eccba4
3
+ metadata.gz: f2cc15a78a6c8ca09ac2a893eea45a4375bb92b0
4
+ data.tar.gz: 2ce1bf50d0ef3793000765360b82abffaad7a06b
5
5
  SHA512:
6
- metadata.gz: 83efda3359c350bb81f7bd646aba271809fec7be97ec2a13cfaa9856a36413358b1669ad0f35f4589b8af26f150b656c630e5b53d17552fcc00ba47616c31336
7
- data.tar.gz: 047666c5da3c22040cec6d567ffc549f74c4402ab5fe24e964b31801e0f4b30a33cca0abccec034deffccc374278c61189536a7f3a883a6166d1bfc73acb81f2
6
+ metadata.gz: cf79bd8131195df9faabd31df4e58c4e47734b07a3cb6f0e5db613f7635f0fee2c0a4d573cd2ef911113672ebc138d30b3f15281235e5607de1188458c6e696e
7
+ data.tar.gz: 7f1ccb86b364c9060ca77137b99f8147ae3a6a65fe5a3c848f1d4184bf208d49e077f645952e687474a80c610ca9c6f839389a50e688d2471b93ce4afd14843f
Binary file
@@ -14,6 +14,9 @@ module OmniAuth
14
14
  # Your code goes here...
15
15
  class Campus < OmniAuth::Strategies::OAuth2
16
16
 
17
+ DEFAULT_RESPONSE_TYPE = 'code'
18
+ DEFAULT_GRANT = 'authorization_code'
19
+
17
20
  option :name, 'campus'
18
21
  args [:client_id, :client_secret]
19
22
  #option :consumer_key, "YzjVHuk8xoXCTcNwYg57yiCW5w59tucC"
@@ -38,6 +41,21 @@ module OmniAuth
38
41
  # }
39
42
  #
40
43
 
44
+ def authorize_params
45
+ super.tap do |params|
46
+ params[:response_type] ||= DEFAULT_RESPONSE_TYPE
47
+ params[:client_id] = client.id
48
+ end
49
+ end
50
+
51
+ def token_params
52
+ super.tap do |params|
53
+ params[:grant_type] ||= DEFAULT_GRANT
54
+ params[:client_id] = client.id
55
+ params[:client_secret] = client.secret
56
+ end
57
+ end
58
+
41
59
  def request_phase
42
60
  redirect client.auth_code.authorize_url({:redirect_uri => callback_url}.merge(options.authorize_params))
43
61
  end
Binary file
@@ -1,6 +1,6 @@
1
1
  module Omniauth
2
2
  module Campus
3
- VERSION = "0.5.6"
3
+ VERSION = "0.5.7"
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.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - johnvehr