keratin-authn 0.1.2 → 0.1.3

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: 847208e3ba358b73e2d6cee499b41646493527b2
4
- data.tar.gz: f1c1b9b89095596627089c2a2daa603c0b951195
3
+ metadata.gz: 75d95ac6c9ef32e84ecd20f8f2431c8bc95557f0
4
+ data.tar.gz: fbd476314716da9dc09efa0c8ad02173902e9c5c
5
5
  SHA512:
6
- metadata.gz: a7c25eb47b0d5ae1b0a9cde426c9472c8731a8ede1a8bfb02ab8689f409e0f37ff7267d9fad88e9d91d5e53a05ac0d1ba705861403bd8ee8d77643aec4317674
7
- data.tar.gz: 7ca65c1c66b67ce50e785b6e06b0c61fb7a47b2d8b9cdc0c52e95d617e982dfa0f5483b2a014c539cca3e6254b6c28977935283d20055af3560f870aac60a0ff
6
+ metadata.gz: a051bb2f34386baccab8d922a06fb5e174f61d5030001097872e2d6169092696726e4054e973bdba27e7cc7b36e74481f9ef418455520a30195a48027c3ecfb7
7
+ data.tar.gz: ed7623eea06f6736fdc4e828200adfe5c78f76a3a59fd9fd440889a2a48fc84073155da385bba01951ff0161bae983c48609efaea868db3cf8041a171856bd2a
@@ -1,3 +1,5 @@
1
+ require 'uri'
2
+
1
3
  module Keratin::AuthN
2
4
  class IDTokenVerifier
3
5
  def initialize(str, keychain)
@@ -19,7 +21,9 @@ module Keratin::AuthN
19
21
  end
20
22
 
21
23
  def token_from_us?
22
- jwt[:iss] == Keratin::AuthN.config.issuer
24
+ # the server or client may be configured with an extra trailing slash, unnecessary port number,
25
+ # or something else that is an equivalent URI but not an equivalent string.
26
+ URI.parse(jwt[:iss]) == URI.parse(Keratin::AuthN.config.issuer)
23
27
  end
24
28
 
25
29
  def token_for_us?
@@ -1,8 +1,10 @@
1
+ require 'net/http'
2
+
1
3
  module Keratin::AuthN
2
4
  class Issuer
3
5
  def initialize(str)
4
6
  @uri = str
5
- @config_uri = @uri + Keratin::AuthN.config.configuration_path
7
+ @config_uri = @uri.chomp('/') + Keratin::AuthN.config.configuration_path
6
8
  end
7
9
 
8
10
  def signing_key
@@ -1,5 +1,5 @@
1
1
  module Keratin
2
2
  module AuthN
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keratin-authn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lance Ivy