capcoauth 0.5.0 → 0.5.1
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/Gemfile.lock +1 -1
- data/lib/capcoauth/engine.rb +1 -1
- data/lib/capcoauth/rails/helpers.rb +1 -1
- data/lib/capcoauth/version.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: 2e7d9ce3ab0387a5e6ff63bfa9990b2ecb552e8e
|
|
4
|
+
data.tar.gz: 4700e039564f3df38017eec44876359cc643176a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc4856103fb5ae49308bb88e0a6de6066a9d21aad931bca50f51843fe9548ca0781d5aa29b87c8617a97864b67c667e63d9066e132f0382eb36af0c6c5e0642f
|
|
7
|
+
data.tar.gz: 80aef30e6b13fdf3cd524d1216b1cfc64eeb12f982cc4af6f093495096ecdcf2b9d486c8f0303d6110e21b458df76e4589edaba087ac02f6aa16e19eafe5b18c
|
data/Gemfile.lock
CHANGED
data/lib/capcoauth/engine.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Capcoauth
|
|
2
2
|
class Engine < Rails::Engine
|
|
3
3
|
initializer 'capcoauth.params.filter' do |app|
|
|
4
|
-
parameters = %w
|
|
4
|
+
parameters = %w(client_secret code authentication_token access_token refresh_token)
|
|
5
5
|
app.config.filter_parameters << /^(#{Regexp.union parameters})$/
|
|
6
6
|
end
|
|
7
7
|
|
|
@@ -40,7 +40,7 @@ module Capcoauth
|
|
|
40
40
|
raise Capcoauth::AuthorizationError, reason if error == :unauthorized_error
|
|
41
41
|
|
|
42
42
|
# Raise an error if token has an ID but the user wasn't found
|
|
43
|
-
if Capcoauth.configuration.require_user and token.user_id.present? and current_user.blank?
|
|
43
|
+
if Capcoauth.configuration.require_user and token.present? and token.user_id.present? and current_user.blank?
|
|
44
44
|
Capcoauth.configuration.logger.info "[CapcOAuth] Error looking up user: Token returned ID ##{token.user_id} but resolver didn't return user"
|
|
45
45
|
raise Capcoauth::AuthorizationError, 'Your credentials were valid, but you aren\'t currently active in this system'
|
|
46
46
|
end
|
data/lib/capcoauth/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capcoauth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Robertson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-10-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|