omniauth-colorgy-oauth2 0.1.3 → 0.1.4

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: 550b9ca1c5c9966734626c78efa3a7f29be9ec1f
4
- data.tar.gz: 8834455bc5bc5a553dc940c2888f3c41e33a841a
3
+ metadata.gz: 29913eb13a4cc3a9a9e423aa333be28283db88cd
4
+ data.tar.gz: 004dbc2e48bafc87659c3540748623e196a82b40
5
5
  SHA512:
6
- metadata.gz: 01c5bfd083fed47f74d73d94c442f8d9287d62d106042b77ebf64aae5bb675c5d66b688de7210aba0b63206068936c24304a23cc0089e612240fa9f5618f715c
7
- data.tar.gz: a0e0357e89ea1b3bef5d348c987029156f60375696ff1e7636439910b8374c523ac98a9d833eeae1dec0599426ed3063c4db68258a2b8961e3bf8b38ff55c212
6
+ metadata.gz: 828eb9354237f9e51159877918e81e38bc9ef29fbc716ec1cee7ca7413ae3531f18518de17d872d6b51e2a1103efea67178f9380d0ff69c6287353f6e9855d97
7
+ data.tar.gz: 4118249af1893a8466763cc36630e4c52303ad019c54dc7e037b936aa1efb9e7d269901380d96d51db36258d2a6020ac6949c5d2308636fd8a39deb245c8ea48
@@ -58,13 +58,20 @@ module ColorgyDeviseSSOManager
58
58
  ENV['CORE_RSA_PUBLIC_KEY'].gsub(/\\n/, "\n")
59
59
  else
60
60
  url = URI.parse("#{core_url}/_rsa.pub")
61
- Net::HTTP.get(url)
61
+ respond = Net::HTTP.get(url)
62
+ if respond.code == '301'
63
+ respond = Net::HTTP.get_response(URI.parse(respond.header['location']))
64
+ else
65
+ respond
66
+ end
62
67
  end
63
68
  end
64
69
 
65
70
  # Getter of the core rsa public key
66
71
  def core_rsa_public_key
67
72
  @@core_rsa_public_key ||= OpenSSL::PKey::RSA.new(core_rsa_public_key_string)
73
+ rescue
74
+ @@core_rsa_public_key ||= OpenSSL::PKey::RSA.new(core_rsa_public_key_string)
68
75
  end
69
76
 
70
77
  # Decode the sign-on status token (sst) string and return a hash
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module ColorgyOAuth2
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-colorgy-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-16 00:00:00.000000000 Z
11
+ date: 2015-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -143,3 +143,4 @@ signing_key:
143
143
  specification_version: 4
144
144
  summary: A Colorgy OAuth2 strategy and SSO client helper for OmniAuth.
145
145
  test_files: []
146
+ has_rdoc: