crowd-client 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. data/crowd-client.gemspec +3 -1
  2. data/lib/crowd-client.rb +2 -2
  3. data/lib/crowd-client/exceptions.rb +2 -1
  4. data/lib/crowd-client/group.rb +42 -0
  5. data/lib/crowd-client/user.rb +121 -0
  6. data/lib/crowd-client/version.rb +1 -1
  7. data/spec/cassettes/Crowd_Client/_in_group_/should_confirm_users_are_in_groups.yml +69 -0
  8. data/spec/cassettes/Crowd_Client/_login/should_authenticate_and_return_a_session_token.yml +42 -0
  9. data/spec/cassettes/Crowd_Client/_login/should_raise_Crowd_Client_Exception_AuthenticationFailed_if_authentication_fails.yml +40 -0
  10. data/spec/cassettes/Crowd_Client/_login/should_raise_Crowd_Client_Exception_InactiveAccount_if_an_account_is_inactive.yml +40 -0
  11. data/spec/cassettes/Crowd_Client/_logout/should_logout_the_current_session.yml +143 -0
  12. data/spec/cassettes/Crowd_Client/_user_groups_username_/should_return_the_groups_of_the_user.yml +36 -0
  13. data/spec/cassettes/Crowd_Client/_user_token_/should_return_the_expanded_user.yml +75 -0
  14. data/spec/cassettes/Crowd_Client/_valid_session_/should_validate_the_current_session.yml +79 -0
  15. data/spec/cassettes/Crowd_Client_Group/_add_user/missing_group/should_raise_Exception_NotFound_for_missing_group.yml +104 -0
  16. data/spec/cassettes/Crowd_Client_Group/_add_user/should_add_the_user.yml +139 -0
  17. data/spec/cassettes/Crowd_Client_Group/_add_user/should_raise_Exception_NotFound_for_missing_user.yml +106 -0
  18. data/spec/cassettes/Crowd_Client_Group/_remove_user/should_remove_the_user.yml +168 -0
  19. data/spec/cassettes/Crowd_Client_Group/_users/should_return_all_of_the_users_in_the_group.yml +36 -0
  20. data/spec/cassettes/Crowd_Client_User/Creating_a_user/should_create_a_user_with_attributes.yml +102 -0
  21. data/spec/cassettes/Crowd_Client_User/Get_groups_for_user/should_be_in_the_group.yml +36 -0
  22. data/spec/cassettes/Crowd_Client_User/Update_user/should_update_user_properties.yml +133 -0
  23. data/spec/cassettes/Crowd_Client_User/_destroy/should_delete_the_user.yml +102 -0
  24. data/spec/cassettes/Crowd_Client_User/authenticate/should_return_false_if_the_password_is_invalid.yml +40 -0
  25. data/spec/cassettes/Crowd_Client_User/authenticate/should_return_true_if_the_password_is_valid.yml +38 -0
  26. data/spec/cassettes/Crowd_Client_User/change_password/should_allow_the_user_to_set_a_new_password.yml +135 -0
  27. data/spec/cassettes/Crowd_Client_User/display_name/.yml +36 -0
  28. data/spec/cassettes/Crowd_Client_User/email/.yml +36 -0
  29. data/spec/crowd-client_group_spec.rb +50 -0
  30. data/spec/crowd-client_spec.rb +0 -3
  31. data/spec/crowd-client_user_spec.rb +75 -0
  32. data/spec/spec_helper.rb +16 -2
  33. metadata +89 -19
  34. data/spec/cassettes/Crowd_Client.yml +0 -358
data/crowd-client.gemspec CHANGED
@@ -19,11 +19,13 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  s.add_development_dependency "rspec"
22
- s.add_development_dependency "vcr"
22
+ s.add_development_dependency "vcr", "~> 2.0.0.rc1"
23
23
  s.add_development_dependency "webmock"
24
+ s.add_development_dependency "ruby-debug19"
24
25
 
25
26
  s.add_runtime_dependency "faraday", "~> 0.7.5"
26
27
  s.add_runtime_dependency "faraday_middleware", "~> 0.7.0"
27
28
  s.add_runtime_dependency "patron", "~> 0.4.16"
28
29
  s.add_runtime_dependency "json", "~> 1.6.1"
30
+ s.add_runtime_dependency "activesupport", "~> 3.1.0"
29
31
  end
data/lib/crowd-client.rb CHANGED
@@ -25,7 +25,7 @@ module Crowd
25
25
 
26
26
  raise Exception::AuthenticationFailed.new if response.status == 400 && response.body['reason'] == 'INVALID_USER_AUTHENTICATION'
27
27
  raise Exception::InactiveAccount.new if response.status == 400 && response.body['reason'] == 'INACTIVE_ACCOUNT'
28
- raise Exception::UnkownError if response.status != 201
28
+ raise Exception::UnknownError.new(response.body.to_s) if response.status != 201
29
29
  return response.body['token']
30
30
  end
31
31
 
@@ -36,7 +36,7 @@ module Crowd
36
36
 
37
37
  def logout(token)
38
38
  response = connection.delete("session/#{token}", {})
39
- raise Exception::UnkownError if response.status != 204
39
+ raise Exception::UnknownError.new(response.body.to_s) if response.status != 204
40
40
  end
41
41
 
42
42
  def user(token)
@@ -1,8 +1,9 @@
1
1
  module Crowd::Client
2
2
  class Exception < RuntimeError; end
3
- class Exception::UnkownError < Crowd::Client::Exception; end
3
+ class Exception::UnknownError < Crowd::Client::Exception; end
4
4
  class Exception::InactiveAccount < Crowd::Client::Exception; end
5
5
  class Exception::AuthenticationFailed < Crowd::Client::Exception; end
6
+ class Exception::NotFound < Crowd::Client::Exception; end
6
7
  end
7
8
 
8
9
 
@@ -0,0 +1,42 @@
1
+ require 'crowd-client'
2
+
3
+ class Crowd::Client::Group
4
+ attr_accessor :groupname
5
+
6
+ def initialize(groupname)
7
+ self.groupname = groupname
8
+ end
9
+
10
+ def users
11
+ response = connection.get('group/user/nested') do |request|
12
+ request.params[:groupname] = groupname
13
+ end
14
+ raise ::Crowd::Client::Exception::NotFound.new("Group '#{groupname}' was not found") if response.status == 404
15
+ response.body['users'].collect do |user|
16
+ ::Crowd::Client::User.new(user['name'])
17
+ end
18
+ end
19
+
20
+ def add_user(user)
21
+ response = connection.post('group/user/direct', :name => user.username) do |request|
22
+ request.params[:groupname] = groupname
23
+ end
24
+ raise ::Crowd::Client::Exception::NotFound.new("Group '#{groupname}' was not found") if response.status == 404
25
+ raise ::Crowd::Client::Exception::NotFound.new("User '#{user.username}' was not found") if response.status == 400
26
+ raise ::Crowd::Client::Exception::UnknownError.new(response.body.to_s) if response.status != 201
27
+ end
28
+
29
+ def remove_user(user)
30
+ response = connection.delete("group/user/direct") do |request|
31
+ request.params[:groupname] = groupname
32
+ request.params[:username] = user.username
33
+ end
34
+ raise ::Crowd::Client::Exception::NotFound.new("User '#{user.username}' was not found") if response.status == 404
35
+ raise ::Crowd::Client::Exception::UnknownError.new(response.body.to_s) if response.status != 204
36
+ end
37
+
38
+ private
39
+ def connection
40
+ ::Crowd::Client.connection
41
+ end
42
+ end
@@ -0,0 +1,121 @@
1
+ require 'crowd-client'
2
+
3
+ class Crowd::Client::User
4
+ attr_accessor :username, :new_record
5
+
6
+ def initialize(username, attributes=nil)
7
+ self.username = username
8
+ self.new_record = true
9
+ assign_attributes attributes, true
10
+ end
11
+
12
+ def self.create(attributes)
13
+ new('', attributes).tap {|user| user.save }
14
+ end
15
+
16
+ def ==(other)
17
+ username == (other && other.username)
18
+ end
19
+
20
+ def first_name
21
+ user_attributes['first-name']
22
+ end
23
+
24
+ def last_name
25
+ user_attributes['last-name']
26
+ end
27
+
28
+ def display_name
29
+ user_attributes['display-name']
30
+ end
31
+
32
+ def email
33
+ user_attributes['email']
34
+ end
35
+
36
+ def groups(reload=false)
37
+ return @groups if @groups && !reload
38
+ response = connection.get("user/group/nested") do |request|
39
+ request.params[:username] = username
40
+ end
41
+ raise ::Crowd::Client::Exception::NotFound.new("User '#{user.username}' was not found") if response.status == 404
42
+ @groups = response.body['groups'].collect do |group|
43
+ ::Crowd::Client::Group.new(group['name'])
44
+ end
45
+ end
46
+
47
+ def reload!
48
+ @groups = nil
49
+ user_attributes(true)
50
+ end
51
+
52
+ def update_attibutes(attributes)
53
+ assign_attributes attributes
54
+ save
55
+ end
56
+
57
+ def save
58
+ if new_record
59
+ response = connection.post('user', {'name' => username, 'active' => true}.merge(@attributes))
60
+ self.new_record = false
61
+ raise ::Crowd::Client::Exception::UnknownError.new(response.body.to_s) if response.status != 201
62
+ else
63
+ response = connection.put('user', {'name' => username}.merge(@attributes)) do |request|
64
+ request.params[:username] = username
65
+ end
66
+ raise ::Crowd::Client::Exception::NotFound.new("User with username '#{username}' was not found.") if response.status == 404
67
+ raise ::Crowd::Client::Exception::UnknownError.new(response.body) if response.status != 204
68
+ end
69
+ end
70
+
71
+ def destroy
72
+ response = connection.delete('user') do |request|
73
+ request.params[:username] = username
74
+ end
75
+ raise ::Crowd::Client::Exception::NotFound.new("User '#{user.username}' was not found") if response.status == 404
76
+ raise ::Crowd::Client::Exception::UnknownError.new(response.body.to_s) if response.status != 204
77
+ end
78
+
79
+ def authenticate?(password)
80
+ response = connection.post('authentication', :value => password) do |request|
81
+ request.params[:username] = username
82
+ end
83
+ response.status == 200
84
+ end
85
+
86
+ def change_password(password)
87
+ response = connection.put('user/password', :value => password) do |request|
88
+ request.params[:username] = username
89
+ end
90
+ raise ::Crowd::Client::Exception::NotFound.new("User '#{user.username}' was not found") if response.status == 404
91
+ raise ::Crowd::Client::Exception::UnknownError.new(response.body.to_s) if response.status != 204
92
+ end
93
+
94
+ private
95
+ def connection
96
+ ::Crowd::Client.connection
97
+ end
98
+
99
+ def password=(password)
100
+ write_attribute :password, {:value => password }
101
+ end
102
+
103
+ def assign_attributes(attributes, include_private=false)
104
+ attributes && attributes.each do |k,v|
105
+ respond_to?(:"#{k}=", include_private) ? send(:"#{k}=", v) : write_attribute(k.to_s.gsub(/[_ ]/, '-'), v)
106
+ end
107
+ end
108
+
109
+ def write_attribute(attribute, value)
110
+ @attributes ||= {}
111
+ @attributes[attribute.to_s] = value
112
+ end
113
+
114
+ def user_attributes(reload=false)
115
+ return @attributes if @attributes && !reload
116
+ response = connection.get("user?username=#{username}")
117
+ raise ::Crowd::Client::Exception::NotFound.new("User with username '#{username}' was not found.") if response.status == 404
118
+ self.new_record = false
119
+ @attributes = response.body
120
+ end
121
+ end
@@ -1,5 +1,5 @@
1
1
  module Crowd
2
2
  module Client
3
- VERSION = "0.0.5"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -0,0 +1,69 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/user/group/nested?groupname=MyGroup&username=user@example.com
6
+ body: ""
7
+ headers:
8
+ Accept:
9
+ - application/json
10
+ Authorization:
11
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
12
+ Expect:
13
+ - ""
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Server:
20
+ - Apache-Coyote/1.1
21
+ X-Embedded-Crowd-Version:
22
+ - Crowd/2.3.3
23
+ X-Crowd-User-Management-Version:
24
+ - "1.1"
25
+ Set-Cookie:
26
+ - JSESSIONID=FCB1D9B970C02C9494B00569525DB4E4; Path=/crowd
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Date:
32
+ - Wed, 21 Dec 2011 20:57:00 GMT
33
+ body: "{\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/group?groupname=MyGroup\",\"rel\":\"self\"},\"name\":\"MyGroup\"}"
34
+ http_version:
35
+ recorded_at: Wed, 21 Dec 2011 20:57:01 GMT
36
+ - request:
37
+ method: get
38
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/user/group/nested?groupname=OtherGroup&username=user@example.com
39
+ body: ""
40
+ headers:
41
+ Accept:
42
+ - application/json
43
+ Authorization:
44
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
45
+ Expect:
46
+ - ""
47
+ response:
48
+ status:
49
+ code: 404
50
+ message: Not Found
51
+ headers:
52
+ Server:
53
+ - Apache-Coyote/1.1
54
+ X-Embedded-Crowd-Version:
55
+ - Crowd/2.3.3
56
+ X-Crowd-User-Management-Version:
57
+ - "1.1"
58
+ Set-Cookie:
59
+ - JSESSIONID=45B66E5CEDDE4E9E277EE77751E4A460; Path=/crowd
60
+ Content-Type:
61
+ - application/json
62
+ Transfer-Encoding:
63
+ - chunked
64
+ Date:
65
+ - Wed, 21 Dec 2011 20:57:00 GMT
66
+ body: "{\"reason\":\"MEMBERSHIP_NOT_FOUND\",\"message\":\"The child entity <user@example.com> is not a member of the parent <OtherGroup>\"}"
67
+ http_version:
68
+ recorded_at: Wed, 21 Dec 2011 20:57:01 GMT
69
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,42 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/session
6
+ body: "{\"username\":\"user@example.com\",\"password\":\"password\"}"
7
+ headers:
8
+ Accept:
9
+ - application/json
10
+ Authorization:
11
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
12
+ Content-Type:
13
+ - application/json
14
+ Expect:
15
+ - ""
16
+ response:
17
+ status:
18
+ code: 201
19
+ message: Created
20
+ headers:
21
+ Server:
22
+ - Apache-Coyote/1.1
23
+ X-Embedded-Crowd-Version:
24
+ - Crowd/2.3.3
25
+ X-Crowd-User-Management-Version:
26
+ - "1.1"
27
+ Set-Cookie:
28
+ - JSESSIONID=0A0D1DC5127E712AAA7765BBEA011013; Path=/crowd
29
+ Cache-Control:
30
+ - no-cache, no-store, no-transform
31
+ Location:
32
+ - http://127.0.0.1:8095/crowd/rest/usermanagement/1/session/XgeHSuCFniINHWnVaH5aDA00
33
+ Content-Type:
34
+ - application/json
35
+ Transfer-Encoding:
36
+ - chunked
37
+ Date:
38
+ - Wed, 21 Dec 2011 20:57:00 GMT
39
+ body: "{\"expand\":\"user\",\"token\":\"XgeHSuCFniINHWnVaH5aDA00\",\"user\":{\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=user@example.com\",\"rel\":\"self\"},\"name\":\"user@example.com\"},\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/session/XgeHSuCFniINHWnVaH5aDA00\",\"rel\":\"self\"}}"
40
+ http_version:
41
+ recorded_at: Wed, 21 Dec 2011 20:57:00 GMT
42
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/session
6
+ body: "{\"username\":\"user@example.com\",\"password\":\"wrong_password\"}"
7
+ headers:
8
+ Accept:
9
+ - application/json
10
+ Authorization:
11
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
12
+ Content-Type:
13
+ - application/json
14
+ Expect:
15
+ - ""
16
+ response:
17
+ status:
18
+ code: 400
19
+ message: Bad Request
20
+ headers:
21
+ Server:
22
+ - Apache-Coyote/1.1
23
+ X-Embedded-Crowd-Version:
24
+ - Crowd/2.3.3
25
+ X-Crowd-User-Management-Version:
26
+ - "1.1"
27
+ Set-Cookie:
28
+ - JSESSIONID=8EF3BF87966D0AAD2A59EBBD027C6BBA; Path=/crowd
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Date:
34
+ - Wed, 21 Dec 2011 20:57:00 GMT
35
+ Connection:
36
+ - close
37
+ body: "{\"reason\":\"INVALID_USER_AUTHENTICATION\",\"message\":\"Failed to authenticate principal, password was invalid\"}"
38
+ http_version:
39
+ recorded_at: Wed, 21 Dec 2011 20:57:00 GMT
40
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/session
6
+ body: "{\"username\":\"inactive_user@example.com\",\"password\":\"password\"}"
7
+ headers:
8
+ Accept:
9
+ - application/json
10
+ Authorization:
11
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
12
+ Content-Type:
13
+ - application/json
14
+ Expect:
15
+ - ""
16
+ response:
17
+ status:
18
+ code: 400
19
+ message: Bad Request
20
+ headers:
21
+ Server:
22
+ - Apache-Coyote/1.1
23
+ X-Embedded-Crowd-Version:
24
+ - Crowd/2.3.3
25
+ X-Crowd-User-Management-Version:
26
+ - "1.1"
27
+ Set-Cookie:
28
+ - JSESSIONID=3AACFC8B062C5E0FA551BF080E4F78B0; Path=/crowd
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Date:
34
+ - Wed, 21 Dec 2011 20:57:00 GMT
35
+ Connection:
36
+ - close
37
+ body: "{\"reason\":\"INACTIVE_ACCOUNT\",\"message\":\"Account with name <inactive_user@example.com> is inactive\"}"
38
+ http_version:
39
+ recorded_at: Wed, 21 Dec 2011 20:57:00 GMT
40
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,143 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/session
6
+ body: "{\"username\":\"user@example.com\",\"password\":\"password\"}"
7
+ headers:
8
+ Accept:
9
+ - application/json
10
+ Authorization:
11
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
12
+ Content-Type:
13
+ - application/json
14
+ Expect:
15
+ - ""
16
+ response:
17
+ status:
18
+ code: 201
19
+ message: Created
20
+ headers:
21
+ Server:
22
+ - Apache-Coyote/1.1
23
+ X-Embedded-Crowd-Version:
24
+ - Crowd/2.3.3
25
+ X-Crowd-User-Management-Version:
26
+ - "1.1"
27
+ Set-Cookie:
28
+ - JSESSIONID=1BBB2D13C278D5DAD979913D2AA7AA3A; Path=/crowd
29
+ Cache-Control:
30
+ - no-cache, no-store, no-transform
31
+ Location:
32
+ - http://127.0.0.1:8095/crowd/rest/usermanagement/1/session/XgeHSuCFniINHWnVaH5aDA00
33
+ Content-Type:
34
+ - application/json
35
+ Transfer-Encoding:
36
+ - chunked
37
+ Date:
38
+ - Wed, 21 Dec 2011 20:57:00 GMT
39
+ body: "{\"expand\":\"user\",\"token\":\"XgeHSuCFniINHWnVaH5aDA00\",\"user\":{\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=user@example.com\",\"rel\":\"self\"},\"name\":\"user@example.com\"},\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/session/XgeHSuCFniINHWnVaH5aDA00\",\"rel\":\"self\"}}"
40
+ http_version:
41
+ recorded_at: Wed, 21 Dec 2011 20:57:01 GMT
42
+ - request:
43
+ method: post
44
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/session/XgeHSuCFniINHWnVaH5aDA00
45
+ body: "{}"
46
+ headers:
47
+ Accept:
48
+ - application/json
49
+ Authorization:
50
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
51
+ Content-Type:
52
+ - application/json
53
+ Expect:
54
+ - ""
55
+ response:
56
+ status:
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ Server:
61
+ - Apache-Coyote/1.1
62
+ X-Embedded-Crowd-Version:
63
+ - Crowd/2.3.3
64
+ X-Crowd-User-Management-Version:
65
+ - "1.1"
66
+ Set-Cookie:
67
+ - JSESSIONID=4B3B482D00F3E769097B6587CB68C19C; Path=/crowd
68
+ Cache-Control:
69
+ - no-cache, no-store, no-transform
70
+ Content-Type:
71
+ - application/json
72
+ Transfer-Encoding:
73
+ - chunked
74
+ Date:
75
+ - Wed, 21 Dec 2011 20:57:00 GMT
76
+ body: "{\"expand\":\"user\",\"token\":\"XgeHSuCFniINHWnVaH5aDA00\",\"user\":{\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=user@example.com\",\"rel\":\"self\"},\"name\":\"user@example.com\"},\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/session/XgeHSuCFniINHWnVaH5aDA00\",\"rel\":\"self\"}}"
77
+ http_version:
78
+ recorded_at: Wed, 21 Dec 2011 20:57:01 GMT
79
+ - request:
80
+ method: delete
81
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/session/XgeHSuCFniINHWnVaH5aDA00
82
+ body: ""
83
+ headers:
84
+ Accept:
85
+ - application/json
86
+ Authorization:
87
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
88
+ Expect:
89
+ - ""
90
+ response:
91
+ status:
92
+ code: 204
93
+ message: No Content
94
+ headers:
95
+ Server:
96
+ - Apache-Coyote/1.1
97
+ X-Embedded-Crowd-Version:
98
+ - Crowd/2.3.3
99
+ X-Crowd-User-Management-Version:
100
+ - "1.1"
101
+ Set-Cookie:
102
+ - JSESSIONID=D585C5539158CEACF9F39F3ACD626A53; Path=/crowd
103
+ Date:
104
+ - Wed, 21 Dec 2011 20:57:00 GMT
105
+ body: ""
106
+ http_version:
107
+ recorded_at: Wed, 21 Dec 2011 20:57:01 GMT
108
+ - request:
109
+ method: post
110
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/session/XgeHSuCFniINHWnVaH5aDA00
111
+ body: "{}"
112
+ headers:
113
+ Accept:
114
+ - application/json
115
+ Authorization:
116
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
117
+ Content-Type:
118
+ - application/json
119
+ Expect:
120
+ - ""
121
+ response:
122
+ status:
123
+ code: 404
124
+ message: Not Found
125
+ headers:
126
+ Server:
127
+ - Apache-Coyote/1.1
128
+ X-Embedded-Crowd-Version:
129
+ - Crowd/2.3.3
130
+ X-Crowd-User-Management-Version:
131
+ - "1.1"
132
+ Set-Cookie:
133
+ - JSESSIONID=EF70FD12EB04501AAE32D69037F59983; Path=/crowd
134
+ Content-Type:
135
+ - application/json
136
+ Transfer-Encoding:
137
+ - chunked
138
+ Date:
139
+ - Wed, 21 Dec 2011 20:57:01 GMT
140
+ body: "{\"reason\":\"INVALID_SSO_TOKEN\",\"message\":\"Token does not validate.\"}"
141
+ http_version:
142
+ recorded_at: Wed, 21 Dec 2011 20:57:01 GMT
143
+ recorded_with: VCR 2.0.0.rc1