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
@@ -0,0 +1,36 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/user/group/nested?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=87F8D87FCB5F7A7E5EB0777634F4E57D; 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: "{\"expand\":\"group\",\"groups\":[{\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/group?groupname=MyGroup\",\"rel\":\"self\"},\"name\":\"MyGroup\"},{\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/group?groupname=users\",\"rel\":\"self\"},\"name\":\"users\"}]}"
34
+ http_version:
35
+ recorded_at: Wed, 21 Dec 2011 20:57:01 GMT
36
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,75 @@
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=BB2640BF87D8BB482B40BDEDE8897CE0; 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: get
44
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/session/XgeHSuCFniINHWnVaH5aDA00?expand=user
45
+ body: ""
46
+ headers:
47
+ Accept:
48
+ - application/json
49
+ Authorization:
50
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
51
+ Expect:
52
+ - ""
53
+ response:
54
+ status:
55
+ code: 200
56
+ message: OK
57
+ headers:
58
+ Server:
59
+ - Apache-Coyote/1.1
60
+ X-Embedded-Crowd-Version:
61
+ - Crowd/2.3.3
62
+ X-Crowd-User-Management-Version:
63
+ - "1.1"
64
+ Set-Cookie:
65
+ - JSESSIONID=2F1A330F8CA7E54C49FE8DE303382404; Path=/crowd
66
+ Content-Type:
67
+ - application/json
68
+ Transfer-Encoding:
69
+ - chunked
70
+ Date:
71
+ - Wed, 21 Dec 2011 20:57:00 GMT
72
+ 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\",\"first-name\":\"Example\",\"last-name\":\"User\",\"display-name\":\"Example User\",\"email\":\"user@example.com\",\"password\":{\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/user/password?username=user@example.com\",\"rel\":\"edit\"}},\"active\":true,\"attributes\":{\"attributes\":[],\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/user/attribute?username=user@example.com\",\"rel\":\"self\"}}},\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/session/XgeHSuCFniINHWnVaH5aDA00\",\"rel\":\"self\"}}"
73
+ http_version:
74
+ recorded_at: Wed, 21 Dec 2011 20:57:01 GMT
75
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,79 @@
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=EA513801017DA2AB7838EF7EFD3EEC5D; 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
+ - 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=57B97B17CC2E49CBB88BA9E297094E4C; 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:00 GMT
79
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,104 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/user
6
+ body: "{\"name\":\"group_add@example.com\",\"active\":true,\"password\":{\"value\":\"test\"},\"first-name\":\"Group\",\"last-name\":\"Add\",\"email\":\"group_add@example.com\"}"
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=A7A8118996BE4B4BAD17D034153E43AB; Path=/crowd
29
+ Location:
30
+ - http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=group_add@example.com
31
+ Content-Type:
32
+ - application/json
33
+ Content-Length:
34
+ - "0"
35
+ Date:
36
+ - Wed, 21 Dec 2011 20:56:59 GMT
37
+ body: ""
38
+ http_version:
39
+ recorded_at: Wed, 21 Dec 2011 20:57:00 GMT
40
+ - request:
41
+ method: post
42
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/group/user/direct?groupname=FakeGroup
43
+ body: "{\"name\":\"user@example.com\"}"
44
+ headers:
45
+ Accept:
46
+ - application/json
47
+ Authorization:
48
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
49
+ Content-Type:
50
+ - application/json
51
+ Expect:
52
+ - ""
53
+ response:
54
+ status:
55
+ code: 404
56
+ message: Not Found
57
+ headers:
58
+ Server:
59
+ - Apache-Coyote/1.1
60
+ X-Embedded-Crowd-Version:
61
+ - Crowd/2.3.3
62
+ X-Crowd-User-Management-Version:
63
+ - "1.1"
64
+ Set-Cookie:
65
+ - JSESSIONID=7E84F240BA6301AA7C247CC8535153C6; Path=/crowd
66
+ Content-Type:
67
+ - application/json
68
+ Transfer-Encoding:
69
+ - chunked
70
+ Date:
71
+ - Wed, 21 Dec 2011 20:56:59 GMT
72
+ body: "{\"reason\":\"GROUP_NOT_FOUND\",\"message\":\"Group <FakeGroup> does not exist\"}"
73
+ http_version:
74
+ recorded_at: Wed, 21 Dec 2011 20:57:00 GMT
75
+ - request:
76
+ method: delete
77
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=group_add@example.com
78
+ body: ""
79
+ headers:
80
+ Accept:
81
+ - application/json
82
+ Authorization:
83
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
84
+ Expect:
85
+ - ""
86
+ response:
87
+ status:
88
+ code: 204
89
+ message: No Content
90
+ headers:
91
+ Server:
92
+ - Apache-Coyote/1.1
93
+ X-Embedded-Crowd-Version:
94
+ - Crowd/2.3.3
95
+ X-Crowd-User-Management-Version:
96
+ - "1.1"
97
+ Set-Cookie:
98
+ - JSESSIONID=EA8822C0DBA88C9324B76799E9CBC890; Path=/crowd
99
+ Date:
100
+ - Wed, 21 Dec 2011 20:56:59 GMT
101
+ body: ""
102
+ http_version:
103
+ recorded_at: Wed, 21 Dec 2011 20:57:00 GMT
104
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,139 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/user
6
+ body: "{\"name\":\"group_add@example.com\",\"active\":true,\"password\":{\"value\":\"test\"},\"first-name\":\"Group\",\"last-name\":\"Add\",\"email\":\"group_add@example.com\"}"
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=A7EDC3C42E7B3B2C39563999A7A06DFC; Path=/crowd
29
+ Location:
30
+ - http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=group_add@example.com
31
+ Content-Type:
32
+ - application/json
33
+ Content-Length:
34
+ - "0"
35
+ Date:
36
+ - Wed, 21 Dec 2011 20:56:59 GMT
37
+ body: ""
38
+ http_version:
39
+ recorded_at: Wed, 21 Dec 2011 20:56:59 GMT
40
+ - request:
41
+ method: post
42
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/group/user/direct?groupname=MyGroup
43
+ body: "{\"name\":\"group_add@example.com\"}"
44
+ headers:
45
+ Accept:
46
+ - application/json
47
+ Authorization:
48
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
49
+ Content-Type:
50
+ - application/json
51
+ Expect:
52
+ - ""
53
+ response:
54
+ status:
55
+ code: 201
56
+ message: Created
57
+ headers:
58
+ Server:
59
+ - Apache-Coyote/1.1
60
+ X-Embedded-Crowd-Version:
61
+ - Crowd/2.3.3
62
+ X-Crowd-User-Management-Version:
63
+ - "1.1"
64
+ Set-Cookie:
65
+ - JSESSIONID=25B78F520DC2777DFB390EAB8AE9F8B5; Path=/crowd
66
+ Location:
67
+ - http://127.0.0.1:8095/crowd/rest/usermanagement/1/group/user/direct?groupname=MyGroup&username=group_add@example.com
68
+ Content-Type:
69
+ - application/json
70
+ Content-Length:
71
+ - "0"
72
+ Date:
73
+ - Wed, 21 Dec 2011 20:56:59 GMT
74
+ body: ""
75
+ http_version:
76
+ recorded_at: Wed, 21 Dec 2011 20:56:59 GMT
77
+ - request:
78
+ method: get
79
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/group/user/nested?groupname=MyGroup
80
+ body: ""
81
+ headers:
82
+ Accept:
83
+ - application/json
84
+ Authorization:
85
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
86
+ Expect:
87
+ - ""
88
+ response:
89
+ status:
90
+ code: 200
91
+ message: OK
92
+ headers:
93
+ Server:
94
+ - Apache-Coyote/1.1
95
+ X-Embedded-Crowd-Version:
96
+ - Crowd/2.3.3
97
+ X-Crowd-User-Management-Version:
98
+ - "1.1"
99
+ Set-Cookie:
100
+ - JSESSIONID=79EBB59CD9A9AC93B34E8C0FE0F03541; Path=/crowd
101
+ Content-Type:
102
+ - application/json
103
+ Transfer-Encoding:
104
+ - chunked
105
+ Date:
106
+ - Wed, 21 Dec 2011 20:56:59 GMT
107
+ body: "{\"expand\":\"user\",\"users\":[{\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=group_add@example.com\",\"rel\":\"self\"},\"name\":\"group_add@example.com\"},{\"link\":{\"href\":\"http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=user@example.com\",\"rel\":\"self\"},\"name\":\"user@example.com\"}]}"
108
+ http_version:
109
+ recorded_at: Wed, 21 Dec 2011 20:56:59 GMT
110
+ - request:
111
+ method: delete
112
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=group_add@example.com
113
+ body: ""
114
+ headers:
115
+ Accept:
116
+ - application/json
117
+ Authorization:
118
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
119
+ Expect:
120
+ - ""
121
+ response:
122
+ status:
123
+ code: 204
124
+ message: No Content
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=51027B4478F09AAD6E8526E38593CC83; Path=/crowd
134
+ Date:
135
+ - Wed, 21 Dec 2011 20:56:59 GMT
136
+ body: ""
137
+ http_version:
138
+ recorded_at: Wed, 21 Dec 2011 20:56:59 GMT
139
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,106 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/user
6
+ body: "{\"name\":\"group_add@example.com\",\"active\":true,\"password\":{\"value\":\"test\"},\"first-name\":\"Group\",\"last-name\":\"Add\",\"email\":\"group_add@example.com\"}"
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=50DC1999D27D945063BE9A127BDD2055; Path=/crowd
29
+ Location:
30
+ - http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=group_add@example.com
31
+ Content-Type:
32
+ - application/json
33
+ Content-Length:
34
+ - "0"
35
+ Date:
36
+ - Wed, 21 Dec 2011 20:56:59 GMT
37
+ body: ""
38
+ http_version:
39
+ recorded_at: Wed, 21 Dec 2011 20:56:59 GMT
40
+ - request:
41
+ method: post
42
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/group/user/direct?groupname=MyGroup
43
+ body: "{\"name\":\"fake\"}"
44
+ headers:
45
+ Accept:
46
+ - application/json
47
+ Authorization:
48
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
49
+ Content-Type:
50
+ - application/json
51
+ Expect:
52
+ - ""
53
+ response:
54
+ status:
55
+ code: 400
56
+ message: Bad Request
57
+ headers:
58
+ Server:
59
+ - Apache-Coyote/1.1
60
+ X-Embedded-Crowd-Version:
61
+ - Crowd/2.3.3
62
+ X-Crowd-User-Management-Version:
63
+ - "1.1"
64
+ Set-Cookie:
65
+ - JSESSIONID=6692C3EFD30A16B2A487764A5F9F85BA; Path=/crowd
66
+ Content-Type:
67
+ - application/json
68
+ Transfer-Encoding:
69
+ - chunked
70
+ Date:
71
+ - Wed, 21 Dec 2011 20:56:59 GMT
72
+ Connection:
73
+ - close
74
+ body: "{\"reason\":\"USER_NOT_FOUND\",\"message\":\"User <fake> does not exist\"}"
75
+ http_version:
76
+ recorded_at: Wed, 21 Dec 2011 20:56:59 GMT
77
+ - request:
78
+ method: delete
79
+ uri: http://127.0.0.1:8095/crowd/rest/usermanagement/1/user?username=group_add@example.com
80
+ body: ""
81
+ headers:
82
+ Accept:
83
+ - application/json
84
+ Authorization:
85
+ - Basic YXBwbGljYXRpb246cGFzc3dvcmQ=
86
+ Expect:
87
+ - ""
88
+ response:
89
+ status:
90
+ code: 204
91
+ message: No Content
92
+ headers:
93
+ Server:
94
+ - Apache-Coyote/1.1
95
+ X-Embedded-Crowd-Version:
96
+ - Crowd/2.3.3
97
+ X-Crowd-User-Management-Version:
98
+ - "1.1"
99
+ Set-Cookie:
100
+ - JSESSIONID=5D443C58B7CEFDE2929A3BF1D72CE685; Path=/crowd
101
+ Date:
102
+ - Wed, 21 Dec 2011 20:56:59 GMT
103
+ body: ""
104
+ http_version:
105
+ recorded_at: Wed, 21 Dec 2011 20:56:59 GMT
106
+ recorded_with: VCR 2.0.0.rc1