omniauth-fenix 1.0.9 → 2.0.0

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: 47ade443df2264c95108508bb98ec3eb32259081
4
- data.tar.gz: cc25e2480b58512cd785fdd91ba5266dfcfae7fd
3
+ metadata.gz: 5bd092cf2d14a5192d5f403cfd8e34b0ff47539a
4
+ data.tar.gz: 2eebb3df1d167be9262c18e756280c9141824e56
5
5
  SHA512:
6
- metadata.gz: 020aa95c5efc30b57ffd27e6662581f86229c39097b58ff9fda6f6d54ebd9419ea527cbfd22e2d9d0b110894536d8a298526094efda3311f8b58565176c3c8b3
7
- data.tar.gz: 47175ff7fd5481d12cbb30daede54c5489c40f1cd1be54961b7d718b9169e15947e06fe4fa0d7af2e9d9605c4de24096058c4e5d173a42becdd616acb0d336b5
6
+ metadata.gz: ecf458c0f357957c98ae48a62cd666e3255ac85c1c5dca69d97a12519e0ed653ad2317e93ea75dfa7e1942844d0cd2f4431fc82ef4547ceff2e84935742db981
7
+ data.tar.gz: 625a147eb72741dfe8c6365f0f087bedcf3d970c3af3a54120fc1a9a133cf40ef86531d6fbd5bd6e9655f1d1d031d0b4145a52c26ef372f69194a19540afc73d
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Fenix
3
- VERSION = "1.0.9"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
@@ -11,6 +11,9 @@ 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
+
14
17
  def request_phase
15
18
  p "oi"
16
19
  p request_url
@@ -37,10 +40,13 @@ module OmniAuth
37
40
  end
38
41
 
39
42
  def build_access_token
43
+ p "e igual"
44
+ p CALLBACK_URL == parsed_callback_url
45
+ p "e igual"
40
46
  token_params = {
41
47
  :client_id => client.id,
42
48
  :client_secret => client.secret,
43
- :redirect_uri => parsed_callback_url,
49
+ :redirect_uri => CALLBACK_URL,
44
50
  :code => request.params['code'],
45
51
  :grant_type => 'authorization_code'
46
52
  }
@@ -55,8 +61,7 @@ module OmniAuth
55
61
  private
56
62
 
57
63
  def request_url
58
- authorize_url = 'https://fenix.tecnico.ulisboa.pt/oauth/'
59
- "#{authorize_url}userdialog?client_id=#{client.id}&redirect_uri=#{callback_url}"
64
+ "#{AUTHORIZE_URL}userdialog?client_id=#{client.id}&redirect_uri=#{callback_url}"
60
65
  end
61
66
  end
62
67
  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: 1.0.9
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rui Mangas Pereira