omniauth-fenix 2.1.2 → 2.1.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: dcab48c95187d61de9c239a37794b4a032773356
4
- data.tar.gz: 5f7ac549fae5fbaa2653b03c52b1ccbcf74c8b0a
3
+ metadata.gz: 84d632c2efe9ecaf657cd98a9d6af675fb84806b
4
+ data.tar.gz: 8edea1d7cc53ee0ce07c7d216cad793bc36a18cf
5
5
  SHA512:
6
- metadata.gz: 2f0b724ded13c4ea331ce39cb5ada79bc29b0bffdb3eb99b70da4184671941a6eeb47f9798743294851a8255c358b51e8898904ea6d454958b02fbe945dd8516
7
- data.tar.gz: 079f3c86fa66bec4fce48e6a2d17dd72afd5b6242539e527d5851f1f6b5d3fe0eb4d666ff818b376551aacee9086a7a6cc61b2c3212fe0cd05b6d2d6855eb393
6
+ metadata.gz: 4d6bb010d1c0e7b7c05c2419aa4c7f31761fb9f974418e1dc93e78b7eeb56b299e31a114d06fdf93c89c213252a6bfec8ca28740b01fb43943999d2975743282
7
+ data.tar.gz: 27e3dc0bb8e19521611a416c0f29fba357a9d6ea963a497c6d7b15c17dbb66e9deaf535e1c854dae50508bd8aca6e36f5214cd02d6c24dd5df5442205700169a
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Fenix
3
- VERSION = "2.1.2"
3
+ VERSION = "2.1.3"
4
4
  end
5
5
  end
@@ -11,9 +11,6 @@ module OmniAuth
11
11
  :authorize_url => 'https://fenix.tecnico.ulisboa.pt/oauth/'
12
12
  }
13
13
 
14
- AUTHORIZE_URL = 'https://fenix.tecnico.ulisboa.pt/oauth/'
15
- CALLBACK_URL = 'http://citysdk.tecnico.ulisboa.pt:3000/auth/fenix/callback'
16
-
17
14
  def request_phase
18
15
  redirect request_url
19
16
  end
@@ -37,24 +34,19 @@ module OmniAuth
37
34
  end
38
35
 
39
36
  def build_access_token
40
- p "OLA"
41
- p callback_url
42
- p "OLA"
43
- token_params = {
44
- :client_id => client.id,
45
- :client_secret => client.secret,
46
- :redirect_uri => CALLBACK_URL,
47
- :code => request.params['code'],
48
- :grant_type => 'authorization_code'
49
- }
50
-
51
- client.get_token(token_params)
37
+ log :info, ">>>>>>>> calling build_access_token"
38
+ verifier = request.params['code']
39
+ log :info, ">>>>>>> code: #{verifier.inspect}"
40
+ log :info, ">>>>> getting auth token now"
41
+ token = client.auth_code.get_token(verifier, token_params)
42
+ log :info, ">>>>>> token: #{token.inspect}"
43
+ token
52
44
  end
53
45
 
54
46
  private
55
47
 
56
48
  def request_url
57
- "#{AUTHORIZE_URL}userdialog?client_id=#{client.id}&redirect_uri=#{callback_url}"
49
+ "#{authorize_url}userdialog?client_id=#{client.id}&redirect_uri=#{callback_url}"
58
50
  end
59
51
  end
60
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-fenix
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rui Mangas Pereira