Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix api redirects and bugs #4101

Merged
merged 2 commits into from
Nov 19, 2018
Merged

Fix api redirects and bugs #4101

merged 2 commits into from
Nov 19, 2018

Conversation

xlecours
Copy link
Contributor

@xlecours xlecours commented Nov 15, 2018

Brief summary of changes

Now redirect /# and /projects to the module/api endpoints

This resolves issue...

  • It was impossible to get an api token on a loris instance runing on apache
  • The module/api/projects class could not find \LORIS\HTTP\Response class du to capitalisation of TTP.
  • The login enpoint error for Unsuported method was throing an error du to json_encode expecting an array but receiving two strings.

To test this change...

send a the following curl request:

curl -k https://<your-vm-hostname>/api/v0.0.3-dev/# -d '{"username": "your-username", "password": "your-password"}'
#put the string token from the response in a token variable
curl -k -H "Authorization: Bearer $token" https://<your-vm-hostname>/api/v0.0.3-dev/projects/
curl -k -H "Authorization: Bearer $token" https://<your-vm-hostname>/api/v0.0.2/projects/

Note that the -k option is used only if your vm ssl certificat is not up to date.

If this sentence shows up it means I didn't read the instructions! Not!

@xlecours xlecours added Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) API PR or issue introducing/requiring modifications to the API code [branch] minor labels Nov 15, 2018
@driusan driusan merged commit 0c71f54 into aces:minor Nov 19, 2018
@cmadjar cmadjar added the Passed Manual Tests PR has undergone proper testing by at least one peer label Nov 19, 2018
@ridz1208 ridz1208 added this to the 20.2.0 milestone Dec 3, 2018
@xlecours xlecours deleted the fix_api_login branch August 4, 2021 13:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
API PR or issue introducing/requiring modifications to the API code Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) Passed Manual Tests PR has undergone proper testing by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants