Passing user authentication to JAX-RS

When a logged in user adds a fedora resource, their username is stored in fedora:ownerId

curl --user testuser:testpass "http://localhost:8080/rest/objects/{PID}/datastreams/{DSID}" -X POST

Then view the datastream profile