omniauth-colorgy-oauth2 0.1.1 → 0.1.2

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: 761943b85e3233140e27f0c47719fed1a005337f
4
- data.tar.gz: 6e267348560e44db0f5964d78d8ac6fe22d99272
3
+ metadata.gz: 622907600c5f96b24b39d4b42610e28f03bb9ef1
4
+ data.tar.gz: 23bb034e4ebfa81208729f41752103107a7a808a
5
5
  SHA512:
6
- metadata.gz: 49b05775dd6c8e0d83d43301f4e0f7784c3c59872fd8241c400be2e3cbdd5915b18b54f09aa2b1889cec508e425944aa5167b10c79ff67ea73e0d680c4d7da86
7
- data.tar.gz: 182a6b13b5c534772d2b45fca99418bc86155e37ba4fa2f3288b4883cc94d06e374dfe922b55a089f9c4083dd7cccdbee2703efc5ddf1f38a7bdc966d71f4c3f
6
+ metadata.gz: f79bf8602b0019477d02208891eb4dd3cb11d7fd939677b0b62cef9b7e4578e175f456d19226e4f73b4085ba2ab84438eb12bb9b8224b7d87a9f0e34fe065f38
7
+ data.tar.gz: 927406a3c0094ae85a137e5563fa8c73444c046d934352bb276b7344385f60e1178a002b791c36aff2db976ce8caf0d74f10756f33a1e76c71841c35334cb80c
@@ -1,3 +1,5 @@
1
+ require 'net/http'
2
+
1
3
  module ColorgyDeviseSSOManager
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -35,7 +37,12 @@ module ColorgyDeviseSSOManager
35
37
 
36
38
  # Getter of the core rsa public key string
37
39
  def core_rsa_public_key_string
38
- @@core_rsa_public_key_string ||= (ENV['CORE_RSA_PUBLIC_KEY'] || Net::HTTP.get(core_domain, '/_rsa.pub')).gsub(/\\n/, "\n")
40
+ if ENV['CORE_RSA_PUBLIC_KEY'].present?
41
+ ENV['CORE_RSA_PUBLIC_KEY'].gsub(/\\n/, "\n")
42
+ else
43
+ url = URI.parse("#{core_url}/_rsa.pub")
44
+ Net::HTTP.get(url)
45
+ end
39
46
  end
40
47
 
41
48
  # Getter of the core rsa public key
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module ColorgyOAuth2
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-colorgy-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neson