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 +4 -4
- data/lib/keratin/authn/id_token_verifier.rb +5 -1
- data/lib/keratin/authn/issuer.rb +3 -1
- data/lib/keratin/authn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75d95ac6c9ef32e84ecd20f8f2431c8bc95557f0
|
4
|
+
data.tar.gz: fbd476314716da9dc09efa0c8ad02173902e9c5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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?
|
data/lib/keratin/authn/issuer.rb
CHANGED
@@ -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
|