ncs_navigator_authority 0.0.2

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.
Files changed (46) hide show
  1. data/.gitignore +5 -0
  2. data/.rvmrc +3 -0
  3. data/Gemfile +4 -0
  4. data/Rakefile +8 -0
  5. data/build.yaml +4 -0
  6. data/buildfile +7 -0
  7. data/lib/ncs_navigator/.DS_Store +0 -0
  8. data/lib/ncs_navigator/authorization.rb +7 -0
  9. data/lib/ncs_navigator/authorization/core.rb +3 -0
  10. data/lib/ncs_navigator/authorization/core/authority.rb +84 -0
  11. data/lib/ncs_navigator/authorization/psc.rb +3 -0
  12. data/lib/ncs_navigator/authorization/psc/authority.rb +193 -0
  13. data/lib/ncs_navigator/authorization/staff_portal.rb +6 -0
  14. data/lib/ncs_navigator/authorization/staff_portal/aker_token.rb +26 -0
  15. data/lib/ncs_navigator/authorization/staff_portal/client.rb +8 -0
  16. data/lib/ncs_navigator/authorization/staff_portal/connection.rb +33 -0
  17. data/lib/ncs_navigator/authorization/staff_portal/http_basic.rb +16 -0
  18. data/lib/ncs_navigator/authorization/version.rb +5 -0
  19. data/ncs_navigator_authority.gemspec +34 -0
  20. data/spec/fixtures/.DS_Store +0 -0
  21. data/spec/fixtures/vcr_cassettes/staff_portal/core/unknown_user.yml +32 -0
  22. data/spec/fixtures/vcr_cassettes/staff_portal/core/user.yml +32 -0
  23. data/spec/fixtures/vcr_cassettes/staff_portal/psc/all_users.yml +34 -0
  24. data/spec/fixtures/vcr_cassettes/staff_portal/psc/empty_users_by_role.yml +34 -0
  25. data/spec/fixtures/vcr_cassettes/staff_portal/psc/empty_users_by_search_criteria.yml +34 -0
  26. data/spec/fixtures/vcr_cassettes/staff_portal/psc/unknown_user.yml +32 -0
  27. data/spec/fixtures/vcr_cassettes/staff_portal/psc/user_by_numeric_id.yml +34 -0
  28. data/spec/fixtures/vcr_cassettes/staff_portal/psc/user_by_username.yml +34 -0
  29. data/spec/fixtures/vcr_cassettes/staff_portal/psc/users_by_first_name.yml +34 -0
  30. data/spec/fixtures/vcr_cassettes/staff_portal/psc/users_by_first_or_last_name.yml +34 -0
  31. data/spec/fixtures/vcr_cassettes/staff_portal/psc/users_by_first_or_last_or_user_name.yml +34 -0
  32. data/spec/fixtures/vcr_cassettes/staff_portal/psc/users_by_first_or_user_name.yml +34 -0
  33. data/spec/fixtures/vcr_cassettes/staff_portal/psc/users_by_last_name.yml +34 -0
  34. data/spec/fixtures/vcr_cassettes/staff_portal/psc/users_by_last_or_user_name.yml +34 -0
  35. data/spec/fixtures/vcr_cassettes/staff_portal/psc/users_by_role.yml +34 -0
  36. data/spec/fixtures/vcr_cassettes/staff_portal/psc/users_by_username.yml +34 -0
  37. data/spec/navigator.ini +118 -0
  38. data/spec/ncs_navigator/.DS_Store +0 -0
  39. data/spec/ncs_navigator/authorization/core/authority_spec.rb +69 -0
  40. data/spec/ncs_navigator/authorization/psc/authority_spec.rb +292 -0
  41. data/spec/ncs_navigator/authorization/psc/role_mapping_spec.rb +99 -0
  42. data/spec/ncs_navigator/authorization/staff_portal/aker_token_spec.rb +36 -0
  43. data/spec/ncs_navigator/authorization/staff_portal/http_basic_spec.rb +17 -0
  44. data/spec/spec_helper.rb +18 -0
  45. data/spec/support/vcr_setup.rb +7 -0
  46. metadata +257 -0
@@ -0,0 +1,34 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "ncs_navigator/authorization/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "ncs_navigator_authority"
7
+ s.version = NcsNavigator::Authorization::VERSION
8
+ s.authors = ["Jalpa Patel"]
9
+ s.email = ["jalpa-patel@northwestern.edu"]
10
+ s.homepage = ""
11
+ s.summary = %q{Authorization module for NCS Navigator}
12
+ s.description = %q{This is a shared library which consume Staff Portal's authorization API and provides group membership information for the NcsNavigator portal and role authorization mapping for PSC.}
13
+
14
+ s.rubyforge_project = "ncs_navigator_authority"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_dependency 'ncs_navigator_configuration', '~> 0.2'
22
+ s.add_dependency 'aker', '~> 3.0'
23
+ s.add_dependency 'faraday', '~> 0.7.5'
24
+ s.add_dependency 'faraday-stack', '~> 0.1.3'
25
+
26
+ s.add_development_dependency 'rspec', '~> 2.6'
27
+ s.add_development_dependency 'rake', '~> 0.9.2'
28
+ s.add_development_dependency 'vcr'
29
+ s.add_development_dependency 'fakeweb'
30
+
31
+ # specify any dependencies here; for example:
32
+ # s.add_development_dependency "rspec"
33
+ # s.add_runtime_dependency "rest-client"
34
+ end
Binary file
@@ -0,0 +1,32 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://staffportal.local/staff/lees.json
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - CasProxy PT-cas-ticket
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 401
13
+ message: Unauthorized
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ content-type:
18
+ - text/plain
19
+ www-authenticate:
20
+ - CasProxy realm="NCSNavigator"
21
+ x-runtime:
22
+ - "0.139200"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Thu, 19 Jan 2012 18:53:20 GMT
27
+ content-length:
28
+ - "23"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwegZhhPIg9zZXNzaW9uX2lkIiUwZDYwZDU1OGRlNDZhY2Y2NmNlNzBiNDE3ZTc3MjkzMQ%3D%3D--ed42ebe8ef98ca2e06f38936faccbc3df4980e07; path=/; HttpOnly
31
+ body: Authentication required
32
+ http_version: "1.1"
@@ -0,0 +1,32 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://staffportal.local/staff/lee.json
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - CasProxy PT-cas-ticket
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ content-type:
18
+ - application/json
19
+ www-authenticate:
20
+ - CasProxy realm="NCSNavigator"
21
+ x-runtime:
22
+ - "0.021019"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Thu, 19 Jan 2012 19:33:26 GMT
27
+ content-length:
28
+ - "23"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwcGcBhPIg9zZXNzaW9uX2lkIiU2NjVlZjkwOGQxYTgxZTY5YzFjMTc4ODQwYjEwNGE4Nw%3D%3D--dd74d8ad11a4d4eaa3898147ef8949db4f53e66e; path=/; HttpOnly
31
+ body: "{\"notify\":true,\"study_center\":20000029,\"ncs_inactive_date\":null,\"staff_type_other\":null,\"roles\":[{\"name\":\"System Administrator\"},{\"name\":\"User Administrator\"},{\"name\":\"Staff Supervisor\"},{\"name\":\"Administrative Staff\"}],\"ethnicity\":null,\"staff_id\":\"test_staff_id\",\"zipcode\":null,\"race_other\":null,\"username\":\"lee\",\"gender\":null,\"external\":false,\"staff_type\":null,\"languages\":[],\"last_name\":\"Peterson\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"lee@test.com\",\"first_name\":\"Lee\",\"ncs_active_date\":null}"
32
+ http_version: "1.1"
@@ -0,0 +1,34 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://psc_application:psc_application@staffportal.local/users.json
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic cHNjX2FwcGxpY2F0aW9uOnBzY19hcHBsaWNhdGlvbg==
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ etag:
18
+ - "\"fbec8abbabd9bc096dc2a17c741d7fce\""
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ x-runtime:
22
+ - "0.222651"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Tue, 13 Mar 2012 20:43:21 GMT
27
+ content-length:
28
+ - "3875"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwdosV9PIg9zZXNzaW9uX2lkIiUyNzNmMjgwODBkYTdiYzgyOWY4MmQxYjI2YThjYjkwZA%3D%3D--eb2717a551a45ef956d3762b01cda59155cb9346; path=/; HttpOnly
31
+ cache-control:
32
+ - max-age=0, private, must-revalidate
33
+ body: "[{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Administrative Staff\"}],\"ncs_inactive_date\":\"2011-12-21\",\"staff_type_other\":null,\"ethnicity\":null,\"staff_id\":\"c1b46c80-0c24-460d-ae89-343aadc7ac68\",\"zipcode\":null,\"numeric_id\":1000943389,\"race_other\":null,\"username\":\"gd123\",\"gender\":null,\"external\":true,\"staff_type\":null,\"languages\":[],\"last_name\":\"Devan\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"grace_devan@test.com\",\"first_name\":\"Grace\",\"ncs_active_date\":null},{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Field Staff\"},{\"name\":\"Outreach Staff\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":null,\"staff_id\":\"5de404f5-9c37-4d92-8f2a-30041400ba06\",\"zipcode\":null,\"numeric_id\":1885042269,\"race_other\":null,\"username\":\"outreach\",\"gender\":null,\"external\":false,\"staff_type\":null,\"languages\":[],\"last_name\":\"Palbo\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"nolan_palbo@test.com\",\"first_name\":\"Nolan\",\"ncs_active_date\":null},{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"System Administrator\"},{\"name\":\"User Administrator\"},{\"name\":\"Staff Supervisor\"},{\"name\":\"Outreach Staff\"},{\"name\":\"Administrative Staff\"},{\"name\":\"Specimen Processor\"},{\"name\":\"Data Reader\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":\"Unknown\",\"staff_id\":\"cf4b6670-5217-4a01-8da6-e1f70b4f2363\",\"zipcode\":12345,\"numeric_id\":1054659121,\"race_other\":null,\"username\":\"superuser\",\"gender\":\"Female\",\"external\":false,\"staff_type\":\"Study Coordinator\",\"languages\":[{\"name\":\"English\"}],\"last_name\":\"Parker\",\"subcontractor\":\"No\",\"race\":\"Native Hawaiian or Other Pacific Islander\",\"experience\":\"6 or more years\",\"email\":\"superuser@test.com\",\"first_name\":\"Jessie\",\"ncs_active_date\":null},{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Staff Supervisor\"},{\"name\":\"Administrative Staff\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":\"Hispanic or Latino\",\"staff_id\":\"9c40a7f3-2b57-4247-9e22-02cd62fe714c\",\"zipcode\":31323,\"numeric_id\":1704064015,\"race_other\":null,\"username\":\"supervisor\",\"gender\":\"Female\",\"external\":false,\"staff_type\":\"Co-Investigator\",\"languages\":[],\"last_name\":\"Horak\",\"subcontractor\":\"Yes\",\"race\":\"American Indian or Alaska Native\",\"experience\":\"Less than 1 year\",\"email\":\"supervisor@test.com\",\"first_name\":\"Clera\",\"ncs_active_date\":null},{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Field Staff\"},{\"name\":\"Phone Staff\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":null,\"staff_id\":\"16912345-ba05-481d-aa80-96e71e1ac9d9\",\"zipcode\":null,\"numeric_id\":960833693,\"race_other\":null,\"username\":\"testuser\",\"gender\":null,\"external\":false,\"staff_type\":null,\"languages\":[],\"last_name\":\"Grant\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"perry_grant@test.com\",\"first_name\":\"Perry\",\"ncs_active_date\":null},{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Biological Specimen Collector\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":null,\"staff_id\":\"fe63e2a3-8827-4b4f-9099-fed41a875418\",\"zipcode\":null,\"numeric_id\":1446841995,\"race_other\":null,\"username\":\"testuser1\",\"gender\":null,\"external\":false,\"staff_type\":null,\"languages\":[],\"last_name\":\"Ward\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"b_ward@test.com\",\"first_name\":\"Barbara\",\"ncs_active_date\":null}]"
34
+ http_version: "1.1"
@@ -0,0 +1,34 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://psc_application:psc_application@staffportal.local/users.json?role%5B%5D=Field%20Staff&role%5B%5D=Phone%20Staff
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic cHNjX2FwcGxpY2F0aW9uOnBzY19hcHBsaWNhdGlvbg==
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ etag:
18
+ - "\"59c92e159922355929ebc5d1e6250f07\""
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ x-runtime:
22
+ - "0.163889"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Tue, 06 Mar 2012 19:28:46 GMT
27
+ content-length:
28
+ - "1005"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwduZVZPIg9zZXNzaW9uX2lkIiU0YzBmZWYxMzU3NDljYmI0OTRhMTg1Nzg4ZTc1YzFkMg%3D%3D--74de3cd65976130dd9df4118f7ba156d94661db8; path=/; HttpOnly
31
+ cache-control:
32
+ - max-age=0, private, must-revalidate
33
+ body: "[]"
34
+ http_version: "1.1"
@@ -0,0 +1,34 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://psc_application:psc_application@staffportal.local/users.json?username=unknown&operator=OR&last_name=unknown&first_name=unknown
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic cHNjX2FwcGxpY2F0aW9uOnBzY19hcHBsaWNhdGlvbg==
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ etag:
18
+ - "\"59c92e159922355929ebc5d1e6250f07\""
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ x-runtime:
22
+ - "0.163889"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Tue, 06 Mar 2012 19:28:46 GMT
27
+ content-length:
28
+ - "1005"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwduZVZPIg9zZXNzaW9uX2lkIiU0YzBmZWYxMzU3NDljYmI0OTRhMTg1Nzg4ZTc1YzFkMg%3D%3D--74de3cd65976130dd9df4118f7ba156d94661db8; path=/; HttpOnly
31
+ cache-control:
32
+ - max-age=0, private, must-revalidate
33
+ body: "[]"
34
+ http_version: "1.1"
@@ -0,0 +1,32 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://psc_application:psc_application@staffportal.local/staff/unknown.json
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic cHNjX2FwcGxpY2F0aW9uOnBzY19hcHBsaWNhdGlvbg==
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 404
13
+ message: Not Found
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ content-type:
18
+ - text/plain
19
+ www-authenticate:
20
+ - CasProxy realm="NCSNavigator"
21
+ x-runtime:
22
+ - "0.139200"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Thu, 19 Jan 2012 18:53:20 GMT
27
+ content-length:
28
+ - "23"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwegZhhPIg9zZXNzaW9uX2lkIiUwZDYwZDU1OGRlNDZhY2Y2NmNlNzBiNDE3ZTc3MjkzMQ%3D%3D--ed42ebe8ef98ca2e06f38936faccbc3df4980e07; path=/; HttpOnly
31
+ body: Unknown Staff
32
+ http_version: "1.1"
@@ -0,0 +1,34 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://psc_application:psc_application@staffportal.local/staff/1234.json
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic cHNjX2FwcGxpY2F0aW9uOnBzY19hcHBsaWNhdGlvbg==
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ etag:
18
+ - "\"f04b7b89ad94f128111bd492c607aea8\""
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ x-runtime:
22
+ - "0.158153"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Tue, 14 Feb 2012 21:29:17 GMT
27
+ content-length:
28
+ - "726"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwct0jpPIg9zZXNzaW9uX2lkIiVhZDA1MDFkNjliOGVlNzQ4ZTM1YzAxNTE4ZjUzYTg1ZQ%3D%3D--caebedd876b8782cf8fa262c3ec5a561315803e8; path=/; HttpOnly
31
+ cache-control:
32
+ - max-age=0, private, must-revalidate
33
+ body: "{\"notify\":true,\"study_center\":20000029,\"ncs_inactive_date\":null,\"staff_type_other\":null,\"roles\":[{\"name\":\"System Administrator\"},{\"name\":\"User Administrator\"},{\"name\":\"Staff Supervisor\"},{\"name\":\"Field Staff\"},{\"name\":\"Phone Staff\"},{\"name\":\"Outreach Staff\"},{\"name\":\"Administrative Staff\"},{\"name\":\"Biological Specimen Collector\"},{\"name\":\"Specimen Processor\"},{\"name\":\"Data Reader\"}],\"ethnicity\":null,\"zipcode\":null,\"numeric_id\":1234, \"race_other\":null,\"username\":\"testuser\",\"gender\":null,\"external\":false,\"staff_type\":null,\"languages\":[],\"last_name\":\"TestLastName\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"testuser@test.com\",\"first_name\":\"TestFirstName\",\"ncs_active_date\":null}"
34
+ http_version: "1.1"
@@ -0,0 +1,34 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://psc_application:psc_application@staffportal.local/staff/testuser.json
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic cHNjX2FwcGxpY2F0aW9uOnBzY19hcHBsaWNhdGlvbg==
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ etag:
18
+ - "\"f04b7b89ad94f128111bd492c607aea8\""
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ x-runtime:
22
+ - "0.158153"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Tue, 14 Feb 2012 21:29:17 GMT
27
+ content-length:
28
+ - "726"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwct0jpPIg9zZXNzaW9uX2lkIiVhZDA1MDFkNjliOGVlNzQ4ZTM1YzAxNTE4ZjUzYTg1ZQ%3D%3D--caebedd876b8782cf8fa262c3ec5a561315803e8; path=/; HttpOnly
31
+ cache-control:
32
+ - max-age=0, private, must-revalidate
33
+ body: "{\"notify\":true,\"study_center\":20000029,\"ncs_inactive_date\":null,\"staff_type_other\":null,\"roles\":[{\"name\":\"System Administrator\"},{\"name\":\"User Administrator\"},{\"name\":\"Staff Supervisor\"},{\"name\":\"Field Staff\"},{\"name\":\"Phone Staff\"},{\"name\":\"Outreach Staff\"},{\"name\":\"Administrative Staff\"},{\"name\":\"Biological Specimen Collector\"},{\"name\":\"Specimen Processor\"},{\"name\":\"Data Reader\"}],\"ethnicity\":null,\"zipcode\":null,\"numeric_id\":1234, \"race_other\":null,\"username\":\"testuser\",\"gender\":null,\"external\":false,\"staff_type\":null,\"languages\":[],\"last_name\":\"TestLastName\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"testuser@test.com\",\"first_name\":\"TestFirstName\",\"ncs_active_date\":null}"
34
+ http_version: "1.1"
@@ -0,0 +1,34 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://psc_application:psc_application@staffportal.local/users.json?first_name=an
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic cHNjX2FwcGxpY2F0aW9uOnBzY19hcHBsaWNhdGlvbg==
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ etag:
18
+ - "\"111ce2313fef8b7dd45e8e8d849a97fd\""
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ x-runtime:
22
+ - "0.091541"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Tue, 13 Mar 2012 21:27:13 GMT
27
+ content-length:
28
+ - "1101"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwexu19PIg9zZXNzaW9uX2lkIiU1NjQzOWQwMTliMjdkZGQ3MTk0YjFmOWY1NmVhYWM2Mg%3D%3D--e5ba684c4012879e34d45751e7dc1fa6723388aa; path=/; HttpOnly
31
+ cache-control:
32
+ - max-age=0, private, must-revalidate
33
+ body: "[{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Field Staff\"},{\"name\":\"Outreach Staff\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":null,\"staff_id\":\"5de404f5-9c37-4d92-8f2a-30041400ba06\",\"zipcode\":null,\"numeric_id\":1885042269,\"race_other\":null,\"username\":\"outreach\",\"gender\":null,\"external\":false,\"staff_type\":null,\"languages\":[],\"last_name\":\"Palbo\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"nolan_palbo@test.com\",\"first_name\":\"Nolan\",\"ncs_active_date\":null},{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Staff Supervisor\"},{\"name\":\"Administrative Staff\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":\"Hispanic or Latino\",\"staff_id\":\"9c40a7f3-2b57-4247-9e22-02cd62fe714c\",\"zipcode\":31323,\"numeric_id\":1704064015,\"race_other\":null,\"username\":\"supervisor\",\"gender\":\"Female\",\"external\":false,\"staff_type\":\"Co-Investigator\",\"languages\":[],\"last_name\":\"Horak\",\"subcontractor\":\"Yes\",\"race\":\"American Indian or Alaska Native\",\"experience\":\"Less than 1 year\",\"email\":\"supervisor@test.com\",\"first_name\":\"Lithan\",\"ncs_active_date\":null}]"
34
+ http_version: "1.1"
@@ -0,0 +1,34 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://psc_application:psc_application@staffportal.local/users.json?operator=OR&last_name=Palbo&first_name=Lithan
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic cHNjX2FwcGxpY2F0aW9uOnBzY19hcHBsaWNhdGlvbg==
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ etag:
18
+ - "\"111ce2313fef8b7dd45e8e8d849a97fd\""
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ x-runtime:
22
+ - "0.275455"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Wed, 14 Mar 2012 17:44:32 GMT
27
+ content-length:
28
+ - "1101"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwf%2F2GBPIg9zZXNzaW9uX2lkIiU2OThlZWJlYmYxNWI4MzE1YmQxZjBlNzk5OWQ2MjdiOA%3D%3D--f6bf7d7707994e575e61afd6584ab57c3505f7cd; path=/; HttpOnly
31
+ cache-control:
32
+ - max-age=0, private, must-revalidate
33
+ body: "[{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Field Staff\"},{\"name\":\"Outreach Staff\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":null,\"staff_id\":\"5de404f5-9c37-4d92-8f2a-30041400ba06\",\"zipcode\":null,\"numeric_id\":1885042269,\"race_other\":null,\"username\":\"outreach\",\"gender\":null,\"external\":false,\"staff_type\":null,\"languages\":[],\"last_name\":\"Palbo\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"nolan_palbo@test.com\",\"first_name\":\"Nolan\",\"ncs_active_date\":null},{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Staff Supervisor\"},{\"name\":\"Administrative Staff\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":\"Hispanic or Latino\",\"staff_id\":\"9c40a7f3-2b57-4247-9e22-02cd62fe714c\",\"zipcode\":31323,\"numeric_id\":1704064015,\"race_other\":null,\"username\":\"supervisor\",\"gender\":\"Female\",\"external\":false,\"staff_type\":\"Co-Investigator\",\"languages\":[],\"last_name\":\"Horak\",\"subcontractor\":\"Yes\",\"race\":\"American Indian or Alaska Native\",\"experience\":\"Less than 1 year\",\"email\":\"supervisor@test.com\",\"first_name\":\"Lithan\",\"ncs_active_date\":null}]"
34
+ http_version: "1.1"
@@ -0,0 +1,34 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://psc_application:psc_application@staffportal.local/users.json?username=gd123&operator=OR&last_name=Palbo&first_name=Lithan
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic cHNjX2FwcGxpY2F0aW9uOnBzY19hcHBsaWNhdGlvbg==
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ etag:
18
+ - "\"273937960f8887ebe971e139b8798b3d\""
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ x-runtime:
22
+ - "0.181361"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Wed, 14 Mar 2012 17:57:39 GMT
27
+ content-length:
28
+ - "1592"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwcT3GBPIg9zZXNzaW9uX2lkIiUzMDgwNjRjMjNiZmYzYTYwZmZjMzZlZTJhNDM1MGRhMw%3D%3D--9d9450394864acafb8f3053adbae46b9aa30880c; path=/; HttpOnly
31
+ cache-control:
32
+ - max-age=0, private, must-revalidate
33
+ body: "[{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Field Staff\"},{\"name\":\"Outreach Staff\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":null,\"staff_id\":\"5de404f5-9c37-4d92-8f2a-30041400ba06\",\"zipcode\":null,\"numeric_id\":1885042269,\"race_other\":null,\"username\":\"outreach\",\"gender\":null,\"external\":false,\"staff_type\":null,\"languages\":[],\"last_name\":\"Palbo\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"nolan_palbo@test.com\",\"first_name\":\"Nolan\",\"ncs_active_date\":null},{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Administrative Staff\"}],\"ncs_inactive_date\":\"2011-12-21\",\"staff_type_other\":null,\"ethnicity\":null,\"staff_id\":\"c1b46c80-0c24-460d-ae89-343aadc7ac68\",\"zipcode\":null,\"numeric_id\":1000943389,\"race_other\":null,\"username\":\"gd123\",\"gender\":null,\"external\":true,\"staff_type\":null,\"languages\":[],\"last_name\":\"Devan\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"grace_devan@test.com\",\"first_name\":\"Grace\",\"ncs_active_date\":null},{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Staff Supervisor\"},{\"name\":\"Administrative Staff\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":\"Hispanic or Latino\",\"staff_id\":\"9c40a7f3-2b57-4247-9e22-02cd62fe714c\",\"zipcode\":31323,\"numeric_id\":1704064015,\"race_other\":null,\"username\":\"supervisor\",\"gender\":\"Female\",\"external\":false,\"staff_type\":\"Co-Investigator\",\"languages\":[],\"last_name\":\"Horak\",\"subcontractor\":\"Yes\",\"race\":\"American Indian or Alaska Native\",\"experience\":\"Less than 1 year\",\"email\":\"supervisor@test.com\",\"first_name\":\"Lithan\",\"ncs_active_date\":null}]"
34
+ http_version: "1.1"
@@ -0,0 +1,34 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://psc_application:psc_application@staffportal.local/users.json?username=gd123&operator=OR&first_name=Lithan
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic cHNjX2FwcGxpY2F0aW9uOnBzY19hcHBsaWNhdGlvbg==
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ etag:
18
+ - "\"c22f945d851f4d43205a43e4fad88be1\""
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ x-runtime:
22
+ - "0.170669"
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
+ date:
26
+ - Wed, 14 Mar 2012 17:51:53 GMT
27
+ content-length:
28
+ - "1088"
29
+ set-cookie:
30
+ - _OMA_session=BAh7ByIZYWtlci5sYXN0X3JlcXVlc3RfYXRsKwe52mBPIg9zZXNzaW9uX2lkIiUxZjhhZDE4N2JjODA2M2Y5NjQ2MTIxMWY5OTBlNjQ5Mw%3D%3D--08f2a126b8ef861e57b4011256c46694333ab51e; path=/; HttpOnly
31
+ cache-control:
32
+ - max-age=0, private, must-revalidate
33
+ body: "[{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Administrative Staff\"}],\"ncs_inactive_date\":\"2011-12-21\",\"staff_type_other\":null,\"ethnicity\":null,\"staff_id\":\"c1b46c80-0c24-460d-ae89-343aadc7ac68\",\"zipcode\":null,\"numeric_id\":1000943389,\"race_other\":null,\"username\":\"gd123\",\"gender\":null,\"external\":true,\"staff_type\":null,\"languages\":[],\"last_name\":\"Devan\",\"subcontractor\":null,\"race\":null,\"experience\":null,\"email\":\"grace_devan@test.com\",\"first_name\":\"Grace\",\"ncs_active_date\":null},{\"notify\":true,\"study_center\":20000029,\"roles\":[{\"name\":\"Staff Supervisor\"},{\"name\":\"Administrative Staff\"}],\"ncs_inactive_date\":null,\"staff_type_other\":null,\"ethnicity\":\"Hispanic or Latino\",\"staff_id\":\"9c40a7f3-2b57-4247-9e22-02cd62fe714c\",\"zipcode\":31323,\"numeric_id\":1704064015,\"race_other\":null,\"username\":\"supervisor\",\"gender\":\"Female\",\"external\":false,\"staff_type\":\"Co-Investigator\",\"languages\":[],\"last_name\":\"Horak\",\"subcontractor\":\"Yes\",\"race\":\"American Indian or Alaska Native\",\"experience\":\"Less than 1 year\",\"email\":\"supervisor@test.com\",\"first_name\":\"Lithan\",\"ncs_active_date\":null}]"
34
+ http_version: "1.1"