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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 622907600c5f96b24b39d4b42610e28f03bb9ef1
|
4
|
+
data.tar.gz: 23bb034e4ebfa81208729f41752103107a7a808a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|