update README instructions for curl
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Max Erenberg 2022-10-12 01:56:54 -04:00
parent f66f7c8f5a
commit a2324090f3
1 changed files with 12 additions and 3 deletions

View File

@ -214,14 +214,23 @@ curl -V
``` ```
Your should see 'SPNEGO' in the 'Features' section. Your should see 'SPNEGO' in the 'Features' section.
Here's an example of making a request (to add a user) to an endpoint which writes to LDAP: Here's an example of making a request to add a user (in the Docker container):
```sh ```sh
# Get a Kerberos TGT first # If you're root, switch to the ctdalek user first
su ctdalek
# Get a Kerberos TGT (password is krb5)
kinit kinit
# Make the request # Make the request
curl --negotiate -u : --service-name ceod --delegation always \ curl --negotiate -u : --service-name ceod --delegation always \
-d '{"uid":"test_1","cn":"Test One","given_name":"Test","sn":"One","program":"Math","terms":["s2021"]}' \ -d '{"uid":"test_1","cn":"Test One","given_name":"Test","sn":"One","program":"Math","terms":["s2021"]}' \
-X POST https://phosphoric-acid.csclub.uwaterloo.ca:9987/api/members -X POST http://phosphoric-acid:9987/api/members
# To delete the user:
curl --negotiate -u : --service-name ceod --delegation always \
-X DELETE http://phosphoric-acid:9987/api/members/test_1
# In prod, use the following base URL instead:
# https://phosphoric-acid.csclub.uwaterloo.ca:9987
``` ```
## Packaging ## Packaging