solid_auth(1p)

solid_auth1p

A solid management tool

Usage

export SOLID_WEBID=https://timbl.inrupt.net/profile/card#me

solid_auth authenticate

solid_auth headers GET https://timbl.inrupt.net/inbox/

solid_auth curl -- -X GET https://timbl.inrupt.net/inbox/

solid_auth curl -- -X POST \ -H "Content-Type: text/plain" \ -d "abc" \

solid_auth curl -- -X PUT \ -H "Content-Type: application/ld+json" \ -d "@myfile.jsonld" \

export SOLID_REMOTE_BASE=https://timbl.inrupt.net

solid_auth list /public/

solid_auth get /inbox/

solid_auth post /inbox/ myfile.jsonld

solid_auth -f put /public/myfile.txt myfile.txt

solid_auth -f patch /public/myfile.txt.meta - <<EOF

INSERT DATA <> <http://example.org> 1234

EOF

solid_auth -f put /public/mytestfolder/

solid_auth delete /public/myfile.txt

mkdir /data/my_copy

solid_auth -r mirror /public/ /data/my_copy

solid_auth -r upload /data/my_copy /public/

solid_auth --keep clean /demo/

solid_auth -r clean /demo/

Environment

SOLID_WEBID

Your WebId.

SOLID_REMOTE_BASE

The Base URL that is used for all delete, get, head, options post, put, patch requests.

SOLID_CLIENT_ID

The URL to a static client configuration. See "etc/web-solid-auth.jsonld" for an example. This file, edited for your own environment, needs to be published on some public accessible webserver.

Configuration

--webid

Your WebId.

--base

The Base URL that is used for all delete, get, head, options post, put, patch requests.

--clientid

The URL to a static client configuration. See "etc/web-solid-auth.jsonld" for an example. This file, edited for your own environment, needs to be published on some public accessible webserver.

--skip

Skip resources that already exist (mirror).

--delete

Delete local files that are not in the remote container (mirror).

--keep

Keep containers when cleaning data (clean).

--etag=STRING

Only update the data when the 'Etag' header matches the given string (put,patch). E.g. use the "head" command to find the ETag of a resource :

    $ solid_auth head /demo/LICENSE
    ...
    ETag: "189aa19989dc47eab46c9f2e8c47d0836bb08cb09f7863cbf3cd3bb9a751be27"
    ...

Now update the resource with ETag protection

    $ solid_auth \
        --etag=189aa19989dc47eab46c9f2e8c47d0836bb08cb09f7863cbf3cd3bb9a751be27 \
        put /demo/LICENSE LICENSE
--force | -f

Force overwriting existing resources (put, patch).

-r

Recursive (clean, mirror, upload).

-x

Do it for real. The commands "clean" and "upload" will run by default in safe mode.

-H name=value

Add a header to a request (repeatable) for "get", "post", "head", "options" and "delete".

Command

authenticate

Start an authentication process for your WebId. You will be presented with a URL that you need to open in a webbrowser. After a successfull login the command can be closed.

The webbrowser needs to be opened on the same host as the where you where you run the solid_auth command.

headers METHOD URL

Return the Authentication and DPoP headers for a HTTP "METHOD" request to "URL".

curl CURL-OPTS

Execute a curl command with Authentication and DPoP headers added. Add a "--" option to the "CURL-OPTS" to stop solid_auth from interpreting Curl options.

list URL

List the resources in a LDP container at URL.

mirror [-rx] [--skip] [--delete] URL DIRECTORY

Mirror the contents of a container to a local directory. Optional provide "-r" option for recursive mirror.

upload [-rx] DIRECTORY URL

Upload a directorty to a container. Optional provide "-r" option for recursive upload. With the "-x" option, the command will run in demo mode.

clean [-rx] [--keep] URL

Clean all resources in a directory. Optional provide "-r" option for recursive clean. With the "-x" option, the command will run in demo mode. With the "--keep" options all container will be kept.

get URL

Return the response of a HTTP GET request to URL.

post URL FILE [MIMETYPE]

Return the HTTP Message of a HTTP POST request of the FILE with MIMETYPE. Uses libmagic to guess the mimetype.

put URL [FILE] [MIMETYPE]

Return the HTTP Message of a HTTP PUT request of the FILE with MIMETYPE. Uses libmagic to guess the mimetype.

When the URL ends with a slash (/), then a new container will be created.

patch URL FILE|SPARQL

Send the contents of a SPARQL patch file or string to a URL. Return the HTTP Message of the HTTP PATCH request to the URL.

head URL

Return the HTTP Header of a HTTP HEAD request to URL.

head OPTIONS

Return the HTTP Header of a HTTP OPTIONS request to URL.

delete URL

Return the HTTP Message of a HTTP DELETE request to URL.

id_token

Show the contents of the JWT id token.

access_token

Show the contents of the JWT access token.

Inspiration

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>.

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

From solid-auth 0.91-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.