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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 617c71c33259345612a71dd497fcb160189ba00c
4
- data.tar.gz: 04944d831e33e37294df27766e00e21b20a3aed7
3
+ metadata.gz: b64d109a313ee934d909d3d4d06e18b38d98ef4d
4
+ data.tar.gz: aa886d669d80765a57bbdccc6d6ec01ea42b2d9b
5
5
  SHA512:
6
- metadata.gz: 933d812f90c908e28ae0322b9af84683fb362626a3c5f7a1410479b0da6beec47c8ffb06f38ed92bca5a2c8d8dc0ad369a1445246d84885a578450bbdda6c2bc
7
- data.tar.gz: caa639cf1fb5cfbbc9bef9fcd6f64f793bf811f6e9b2a92142950c4b63034b2a61e4a517ed75bf18a4fc1269a0d60d093ce40170f62e54318901cc82b5dad242
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
- [![Build Status](https://travis-ci.org/goinstant/ruby-goinstant-auth.png&branch=master)](https://travis-ci.org/goinstant/ruby-goinstant-auth)
5
+ [![Build Status](https://travis-ci.org/goinstant/ruby-goinstant-auth.png?branch=master)](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
- jwt = signer.sign({
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 [StandardError] when the key is too short
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 StandardError.new(
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(StandardError, 'expected key length >= 32 bytes, got 3 bytes')
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.1
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-20 00:00:00.000000000 Z
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