omniauth-gov 0.1.7 → 0.1.8

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
  SHA256:
3
- metadata.gz: c6840a35099a1ca67e4d477aa22b010b3bfe6b3a774634002a4ecb21967e3f3c
4
- data.tar.gz: 9769699d8ee31a1359fe1435bbdf2c6b39bc013ab28dac419d7f8716693bacc7
3
+ metadata.gz: 829aa13e5c71fc5063a31135b0300dcf748f0fdd5cc4451e6160d57b8e9e20d5
4
+ data.tar.gz: e3fae85613ff0d66feb47ed29e66e1b3203481223912fe3c53a4e00ed5e55abc
5
5
  SHA512:
6
- metadata.gz: b0856e71109b9cd2345d77e74e11e743ab9d8ce4c67aa5ef6762bfb75b24b5be88963a7b2645d2684ed3ecef62afede57eacb4eafedd4b56b07181f7e66710ac
7
- data.tar.gz: 4848581c3d8029cba39e26cc803c42799664197daad6d0cae93c1480dc01fa62d0817501da16386ece9f858903b2ed93b6142667a3966bb49859be50c5ca4f56
6
+ metadata.gz: 7b5ea3b42e416f91c8ff2a0a46dc2a32fc23b23793396f47d6d3818aa0824ff1dbe5b6326b82365c448b28971b80d266185c1d6c99737285dd3d65fc0b6a4682
7
+ data.tar.gz: 47de0c020b5864231ab58f0300b0805396c8074d563c52f9c2c06377a70a88d60bd5263b978fe15750ac502a44f08f80949e64891cbca9604ee29b45fb98ddba
@@ -74,11 +74,10 @@ module Omniauth
74
74
 
75
75
  def build_access_token
76
76
  verifier = request.params["code"]
77
- redirect_uri = "#{OmniAuth.config.full_host}/#{options.callback_path}".gsub!(%r{/+}, '/')
78
77
 
79
78
  atoken = client.auth_code.get_token(
80
79
  verifier,
81
- {"grant_type": "authorization_code", "code": verifier, "redirect_uri": redirect_uri, "code_verifier": session["omniauth.pkce.verifier"]},
80
+ {"grant_type": "authorization_code", "code": verifier, "redirect_uri": OmniAuth.config.full_host+options.callback_path, "code_verifier": session["omniauth.pkce.verifier"]},
82
81
  {"Content-Type" => "application/x-www-form-urlencoded", "Authorization" => "Basic #{Base64.strict_encode64(options.client_id+":"+options.client_secret)}" })
83
82
  atoken
84
83
  end
@@ -86,4 +85,4 @@ module Omniauth
86
85
  end
87
86
  end
88
87
 
89
- OmniAuth.config.add_camelization 'gov', 'Gov'
88
+ OmniAuth.config.add_camelization 'gov', 'Gov'
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Gov
3
- VERSION = "0.1.7"
3
+ VERSION = "0.1.8"
4
4
  end
5
5
  end
data/lib/omniauth-gov.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  require "omniauth-gov/version"
2
- require 'omniauth/strategies/gov'
3
- require 'gov_br/params_encoder'
2
+ require 'gov_br/params_encoder'
3
+ require 'omniauth/strategies/gov'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-gov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Ricardo
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
- rubygems_version: 3.2.3
152
+ rubygems_version: 3.4.19
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Official OmniAuth strategy for GitHub.