goinstant-auth 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/goinstant/auth/signer.rb +2 -2
- data/spec/goinstant/auth/signer_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b64d109a313ee934d909d3d4d06e18b38d98ef4d
|
4
|
+
data.tar.gz: aa886d669d80765a57bbdccc6d6ec01ea42b2d9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3278b314977b0b261ecd593754307d71415c96d48dd8ce669fd24f1fb2b926fbf1b4072d7e70077ad9bb5816bad639554c8bd5167ce4799bc788761bc7787d
|
7
|
+
data.tar.gz: df325d49b0b9fe4f241de53fbc1ce105265acd879e70ae3885776e3dfa02ec3cb1d0f33b9c1e8a3be7500cb75b9ff5b86e77d1f2352a4922ef8a43820528db2c
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
GoInstant Authentication for Your Ruby Application
|
4
4
|
|
5
|
-
[](https://travis-ci.org/goinstant/ruby-goinstant-auth)
|
6
6
|
|
7
7
|
This is an implementation of JWT tokens consistent with what's specified in the
|
8
8
|
[GoInstant Users and Authentication
|
@@ -40,7 +40,7 @@ You can then use this `signer` to create as many tokens as you want. The
|
|
40
40
|
optional.
|
41
41
|
|
42
42
|
```ruby
|
43
|
-
|
43
|
+
token = signer.sign({
|
44
44
|
:domain => 'example.com', # TODO: replace me
|
45
45
|
:id => user.id,
|
46
46
|
:display_name => user.full_name,
|
@@ -19,7 +19,7 @@ module GoInstant
|
|
19
19
|
# representing the secret key for your GoInstant App.
|
20
20
|
#
|
21
21
|
# @raise [TypeError] when the key isn't in base64/base64url format.
|
22
|
-
# @raise [
|
22
|
+
# @raise [SignerError] when the key is too short
|
23
23
|
#
|
24
24
|
def initialize(secret_key)
|
25
25
|
if secret_key.nil? then
|
@@ -32,7 +32,7 @@ module GoInstant
|
|
32
32
|
end
|
33
33
|
|
34
34
|
if @binary_key.size < 32 then
|
35
|
-
raise
|
35
|
+
raise SignerError.new(
|
36
36
|
'expected key length >= 32 bytes, got %d bytes' % @binary_key.size
|
37
37
|
)
|
38
38
|
end
|
@@ -39,7 +39,7 @@ describe GoInstant::Auth::Signer do
|
|
39
39
|
it "complains if too short" do
|
40
40
|
expect {
|
41
41
|
GoInstant::Auth::Signer.new('abcd')
|
42
|
-
}.to raise_error(
|
42
|
+
}.to raise_error(GoInstant::Auth::SignerError, 'expected key length >= 32 bytes, got 3 bytes')
|
43
43
|
end
|
44
44
|
|
45
45
|
def validate_jwt(jwt, expect_claims, expect_sig)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goinstant-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GoInstant Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Lets your users log-in to your GoInstant app
|
14
14
|
email: support@goinstant.org
|