| SOLID_AUTH(1p) | User Contributed Perl Documentation | SOLID_AUTH(1p) |
solid_auth - A Solid management tool
# Set your default webid
export SOLID_WEBID=https://timbl.inrupt.net/profile/card#me
# Authentication to a pod
solid_auth authenticate
# Get the http headers for a authenticated request
solid_auth headers GET https://timbl.inrupt.net/inbox/
# Act like a curl command and fetch authenticated content
solid_auth curl -- -X GET https://timbl.inrupt.net/inbox/
# Add some data
solid_auth curl -- -X POST \
-H "Content-Type: text/plain" \
-d "abc" \
https://timbl.inrupt.net/public/
# Add a file
solid_auth curl -- -X PUT \
-H "Content-Type: application/ld+json" \
-d "@myfile.jsonld" \
https://timbl.inrupt.net/public/myfile.jsonld
# Set a solid base url
export SOLID_REMOTE_BASE=https://timbl.inrupt.net
# List all resources on some Pod path
solid_auth list /public/
# Get some data
solid_auth get /inbox/
# Post some data
solid_auth post /inbox/ myfile.jsonld
# Put some data
solid_auth -f put /public/myfile.txt myfile.txt
# Patch data
solid_auth -f patch /public/myfile.txt.meta - <<EOF
INSERT DATA { <> <http://example.org> 1234 }
EOF
# Create a folder
solid_auth -f put /public/mytestfolder/
# Delete some data
solid_auth delete /public/myfile.txt
# Mirror a resource, container or tree
mkdir /data/my_copy
solid_auth -r mirror /public/ /data/my_copy
# Upload a directory to the pod
# Add the -x option to do it for real (only a test without this option)
solid_auth -r upload /data/my_copy /public/
# Clean all files in a container
# Add the -x option to do it for real (only a test without this option)
solid_auth --keep clean /demo/
# Clean a complete container
# Add the -x option to do it for real (only a test without this option)
solid_auth -r clean /demo/
$ solid_auth head /demo/LICENSE
...
ETag: "189aa19989dc47eab46c9f2e8c47d0836bb08cb09f7863cbf3cd3bb9a751be27"
...
Now update the resource with ETag protection
$ solid_auth \
--etag=189aa19989dc47eab46c9f2e8c47d0836bb08cb09f7863cbf3cd3bb9a751be27 \
put /demo/LICENSE LICENSE
The webbrowser needs to be opened on the same host as the where you where you run the solid_auth command.
When the URL ends with a slash (/), then a new container will be created.
This was very much inspired by the Python solid-flask code by Rai <http://agentydragon.com> at <https://gitlab.com/agentydragon/solid-flask>, and Jeff Zucker's <https://github.com/jeff-zucker> Solid-Shell at <https://www.npmjs.com/package/solid-shell>.
This software is copyright (c) 2021 by Patrick Hochstenbach.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| 2023-09-04 | perl v5.36.0 |