omniauth_crowd 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
@@ -7,12 +7,12 @@ module OmniAuth
|
|
7
7
|
DEFAULT_SESSION_URL = "%s/rest/usermanagement/latest/session"
|
8
8
|
DEFAULT_AUTHENTICATION_URL = "%s/rest/usermanagement/latest/authentication"
|
9
9
|
DEFAULT_USER_GROUP_URL = "%s/rest/usermanagement/latest/user/group/direct"
|
10
|
-
attr_reader :crowd_application_name, :crowd_password, :disable_ssl_verification, :include_users_groups, :use_sessions, :session_url
|
10
|
+
attr_reader :crowd_application_name, :crowd_password, :disable_ssl_verification, :include_users_groups, :use_sessions, :session_url, :content_type
|
11
11
|
|
12
12
|
alias :"disable_ssl_verification?" :disable_ssl_verification
|
13
13
|
alias :"include_users_groups?" :include_users_groups
|
14
14
|
alias :"use_sessions?" :use_sessions
|
15
|
-
|
15
|
+
|
16
16
|
# @param [Hash] params configuration options
|
17
17
|
# @option params [String, nil] :crowd_server_url the Crowd server root URL; probably something like
|
18
18
|
# `https://crowd.mycompany.com` or `https://crowd.mycompany.com/crowd`; optional.
|
@@ -33,17 +33,17 @@ module OmniAuth
|
|
33
33
|
|
34
34
|
# Build a Crowd authentication URL from +username+.
|
35
35
|
#
|
36
|
-
# @param [String] username the username to validate
|
37
|
-
#
|
36
|
+
# @param [String] username the username to validate
|
37
|
+
#
|
38
38
|
# @return [String] a URL like `https://crowd.myhost.com/crowd/rest/usermanagement/latest/authentication?username=USERNAME`
|
39
39
|
def authentication_url(username)
|
40
40
|
append_username @authentication_url, username
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
def user_group_url(username)
|
44
44
|
@user_group_url.nil? ? nil : append_username( @user_group_url, username)
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
private
|
48
48
|
def parse_params(options)
|
49
49
|
options= {:include_user_groups => true}.merge(options || {})
|
@@ -53,6 +53,7 @@ module OmniAuth
|
|
53
53
|
@crowd_application_name = options[:application_name]
|
54
54
|
@crowd_password = options[:application_password]
|
55
55
|
@use_sessions = options[:use_sessions]
|
56
|
+
@content_type = options[:content_type]
|
56
57
|
|
57
58
|
unless options.include?(:crowd_server_url) || options.include?(:crowd_authentication_url)
|
58
59
|
raise ArgumentError.new("Either :crowd_server_url or :crowd_authentication_url MUST be provided")
|
@@ -92,7 +93,7 @@ module OmniAuth
|
|
92
93
|
result << 'username='
|
93
94
|
result << Rack::Utils.escape(username)
|
94
95
|
end
|
95
|
-
|
96
|
+
|
96
97
|
end
|
97
98
|
end
|
98
99
|
end
|
@@ -84,6 +84,9 @@ BODY
|
|
84
84
|
req = http_method.new(uri.query.nil? ? uri.path : "#{uri.path}?#{uri.query}")
|
85
85
|
req.body = body if body
|
86
86
|
req.basic_auth @configuration.crowd_application_name, @configuration.crowd_password
|
87
|
+
if @configuration.content_type
|
88
|
+
req.add_field 'Content-Type', @configuration.content_type
|
89
|
+
end
|
87
90
|
http.request(req)
|
88
91
|
end
|
89
92
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth_crowd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|
@@ -179,7 +179,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: '0'
|
180
180
|
segments:
|
181
181
|
- 0
|
182
|
-
hash:
|
182
|
+
hash: 2543748963679451209
|
183
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
184
|
none: false
|
185
185
|
requirements:
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: '0'
|
189
189
|
segments:
|
190
190
|
- 0
|
191
|
-
hash:
|
191
|
+
hash: 2543748963679451209
|
192
192
|
requirements: []
|
193
193
|
rubyforge_project:
|
194
194
|
rubygems_version: 1.8.25
|