doorkeeper_hub 0.2.5 → 0.2.6
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4886a1e7e646155e1ece5c76032fbe062bf349e2
|
4
|
+
data.tar.gz: 46dcb35435f9ecd36f26618143b8e86898fa0adf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cef5140bb3c95bc5839a25a46f905d1e326bd89b96b022ff6f9f8ad79779de8ae60a615ab0bb498153b7581eb433eeda344d7a7b04d8eb036b0f5d0e75e91663
|
7
|
+
data.tar.gz: f67e59d3d307c29317aa5296e5444402e57b07b49de20d363a4093b5a041f1a51985d2660e9eb5fdee66e5a40f863f764f4a5e3342dcbf868852892d577fce51
|
@@ -8,8 +8,8 @@ module DoorkeeperHub
|
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
self.service_token = ENV["SERVICE_TOKEN"]
|
11
|
-
self.user_model =
|
12
|
-
self.scope_model =
|
11
|
+
self.user_model = 'User'
|
12
|
+
self.scope_model = 'Company'
|
13
13
|
self.doorkeeper_token_name = :doorkeeper_token
|
14
14
|
self.client_mode = false
|
15
15
|
end
|
data/lib/doorkeeper_hub/saml.rb
CHANGED
@@ -10,7 +10,7 @@ module DoorkeeperHub
|
|
10
10
|
|
11
11
|
class_methods do
|
12
12
|
def from_omniauth(auth)
|
13
|
-
return if DoorkeeperHub.client_mode? && scope_results(auth).empty?
|
13
|
+
return if !DoorkeeperHub.client_mode? && scope_results(auth).empty?
|
14
14
|
|
15
15
|
user = where(provider: auth.provider, uid: auth.uid).first_or_create do |user|
|
16
16
|
user.email = auth.info.email
|
@@ -28,6 +28,7 @@ module DoorkeeperHub
|
|
28
28
|
def scope_results(auth)
|
29
29
|
@scope_results ||= DoorkeeperHub
|
30
30
|
.config.scope_model
|
31
|
+
.constantize
|
31
32
|
.where(scope_query(auth))
|
32
33
|
end
|
33
34
|
|
data/lib/doorkeeper_hub.rb
CHANGED
@@ -14,11 +14,11 @@ module DoorkeeperHub
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.devise_routes_scope
|
17
|
-
user_model.
|
17
|
+
user_model.tableize.to_sym
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.devise_scope
|
21
|
-
user_model.
|
21
|
+
user_model.underscore.to_sym
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.user_model
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doorkeeper_hub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Fan
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.
|
115
|
+
rubygems_version: 2.5.2
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: SSO Gem from DevHub.
|