fridge 0.1.0 → 0.1.1

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: 14721d992f4d97d606aa10ea94c061553328292f
4
- data.tar.gz: 377c3b2543822ebdeea357a4e9ead8bd45ca4938
3
+ metadata.gz: e778b64e5e08eca5fee8b818ddd9ece69f9b6777
4
+ data.tar.gz: 06949113737a9413e4cdf04821e9caf33dd94307
5
5
  SHA512:
6
- metadata.gz: 556a8a8805c2402d1accabe75bcc860a23659f528eaca8cf84868c12524ff0893312e6ef3b02e418705c4bdfe7601a3ab75d68ead2df8fa74b00d07624016cd8
7
- data.tar.gz: 33936c9085ebf03959a4a7a6d6ad7d8d53377e3899e3008e56191ef401c1cf3da9a0edbe2799cfdd3e417ae30cc64d5b222a03167348c94251004851728ee532
6
+ metadata.gz: f8d336321d0f8ed2d749a55d3c58bfcdb467c013d63d9bb869ebff8b9ec498e21ee81a7452a3e0a74257de8acd4a8dbfdd813da136724430e84de384eaf3d367
7
+ data.tar.gz: 43e493486f03b0d08196303b8076ef42bc7dc8d7e0b0dc584a287bc88f2bf95782c819f50028e24a548b5fd877bb5a4b73c59f4eeb9c20ac822326aeadba91e0
data/README.md CHANGED
@@ -23,7 +23,7 @@ And then run `bundle install`.
23
23
  | `private_key` | Private token signing key | A PEM-formatted key |
24
24
  | `public_key` | Public token verification key (the private key's complement) | A PEM-formatted key |
25
25
  | `signing_algorithm` | Algorithm to use for sigining and verification | `RS512`, `RS256` |
26
- | `validator` | A lambda used to perform custom validation of tokens | Any `Proc` |
26
+ | `validator` | A lambda used to perform custom validation of tokens | Any `Proc` |
27
27
 
28
28
  Resource servers must configure a public key corresponding to an authorization server, in order to verify tokens issued by that server. Authorization servers must configure a private key.
29
29
 
data/lib/fridge.rb CHANGED
@@ -18,7 +18,6 @@ module Fridge
18
18
 
19
19
  # A validator must raise an exception or return a false value for an
20
20
  # invalid token
21
- has :validator, classes: [Proc],
22
- default: -> (access_token) { access_token.valid? }
21
+ has :validator, classes: [Proc], default: ->(token) { token.valid? }
23
22
  end
24
23
  end
@@ -1,3 +1,3 @@
1
1
  module Fridge
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -72,7 +72,7 @@ describe Controller, type: :controller do
72
72
  end
73
73
 
74
74
  it 'should raise an error if custom validation fails' do
75
- Fridge.configuration.validator = -> (token) { false }
75
+ Fridge.configuration.validator = ->(token) { false }
76
76
  expect { controller.current_token }.to raise_error Fridge::InvalidToken
77
77
  end
78
78
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fridge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery