Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GitHub Issue: part of Islandora/documentation#597
What does this Pull Request do?
Adds parameters to functions in IFedoraApi and its implementations so that we can pass authorization tokens through to Fedora. I ran into this when trying to issue a HEAD request to get an ETag.
What's new?
The interface changes above. I also ran into a funky issue with how Guzzle clients handle their base uri, so I added some sanitization around that so no one else wastes an hour next time they don't add the trailing slash to their fedora base url.
How should this be tested?
Before this PR, give Chullo a base url of
http://localhost:8080/fcrepo/rest
and issue a PUT request tohttp://localhost:8080/fcrepo/rest/foo
. You should get denied with a 403.Pull in this PR and do the same. You should get a successful response and be able to visit the created resource.
You can then also issue HEAD, OPTION, and DELETE requests passing in your JWT as the 'Authorization' header with a FedoraApi class. Analogous functions in Chullo have also been updated, so you can try those out too.
Interested parties
@Islandora-CLAW/committers