{"id":16009834,"url":"https://github.com/phochste/web-solid-auth","last_synced_at":"2026-02-23T16:05:53.827Z","repository":{"id":56841114,"uuid":"342272392","full_name":"phochste/Web-Solid-Auth","owner":"phochste","description":"A Perl Solid authentication tool (OIDC)","archived":false,"fork":false,"pushed_at":"2022-02-17T07:39:08.000Z","size":121,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-13T18:37:39.255Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phochste.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-25T14:32:40.000Z","updated_at":"2023-09-13T18:53:03.000Z","dependencies_parsed_at":"2022-08-29T06:50:33.367Z","dependency_job_id":null,"html_url":"https://github.com/phochste/Web-Solid-Auth","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phochste%2FWeb-Solid-Auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phochste%2FWeb-Solid-Auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phochste%2FWeb-Solid-Auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phochste%2FWeb-Solid-Auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phochste","download_url":"https://codeload.github.com/phochste/Web-Solid-Auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247685596,"owners_count":20979085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T13:04:26.704Z","updated_at":"2025-10-28T14:05:57.677Z","avatar_url":"https://github.com/phochste.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nWeb::Solid::Auth - A Perl Solid Web Client\n\n# SYNOPSIS\n\n    # On the command line\n\n    # Set your default webid\n    export SOLID_WEBID=https://timbl.inrupt.net/profile/card#me\n\n    # Authentication to a pod\n    solid_auth.pl authenticate\n\n    # Get the http headers for a authenticated request\n    solid_auth.pl headers GET https://timbl.inrupt.net/inbox/\n\n    # Act like a curl command and fetch authenticated content\n    solid_auth.pl curl -X GET https://timbl.inrupt.net/inbox/\n\n    # Add some data\n    solid_auth.pl curl -X POST \\\n            -H \"Content-Type: text/plain\" \\\n            -d \"abc\" \\\n            https://timbl.inrupt.net/public/\n    \n    # Add a file\n    solid_auth.pl curl -X PUT \\\n            -H \"Content-Type: application/ld+json\" \\\n            -d \"@myfile.jsonld\" \\\n            https://timbl.inrupt.net/public/myfile.jsonld \n\n    # Set a solid base url\n    export SOLID_REMOTE_BASE=https://timbl.inrupt.net\n\n    # List all resources on some Pod path\n    solid_auth.pl list /public/\n\n    # Get some data\n    solid_auth.pl get /inbox/\n\n    # Post some data\n    solid_auth.pl post /inbox/ myfile.jsonld \n\n    # Put some data\n    solid_auth.pl put /public/myfile.txt myfile.txt \n\n    # Create a folder\n    solid_auth.pl put /public/mytestfolder/\n\n    # Delete some data\n    solid_auth.pl delete /public/myfile.txt\n\n    # Mirror a resource, container or tree\n    solid_auth.pl mirror /public/ ./my_copy\n\n    # Upload a directory to the pod\n    #  Add the -x option to do it for real (only a test without this option)\n    solid_auth.pl -r upload /data/my_copy /public/\n\n    # Clean all files in a container\n    #  Add the -x option to do it for real (only a test without this option)\n    solid_auth.pl --keep clean /demo/\n\n    # Clean a complete container \n    #  Add the -x option to do it for real (only a test without this option)\n    solid_auth.pl -r clean /demo/\n\n    # In a perl program\n    use Web::Solid::Auth;\n    use Web::Solid::Auth::Listener;\n\n    # Create a new authenticator for a pod\n    my $auth = Web::Solid::Auth-\u003enew(webid =\u003e $webid);\n\n    # Or tune a listerner\n    my $auth = Web::Solid::Auth-\u003enew(\n          webid     =\u003e $webid ,\n          listener =\u003e Web::Solid::Auth::Listener-\u003enew(\n                scheme =\u003e 'https'\n                host   =\u003e 'my.server.org'\n                port   =\u003e '443' ,\n                path   =\u003e '/mycallback'\n          )\n    );\n\n    # Or, in case you have your own callback server\n    my $auth = Web::Solid::Auth-\u003enew(\n          webid         =\u003e $webid,\n          redirect_uri =\u003e 'https://my.server.org/mycallback'\n    );\n\n    # Generate a url for the user to authenticate\n    my $auth_url = $auth-\u003emake_authorization_request;\n\n    # Listen for the oauth server to return tokens\n    # the built-in listener for feedback from the openid provider\n    # Check the code of Web::Solid::Auth::Listener how to\n    # do this inside your own Plack application\n    $auth-\u003elisten;\n\n    ####\n\n    # If you already have access_tokens from previous step\n    if ($auth-\u003ehas_access_token) {\n        # Fetch the Authentication and DPoP HTTP headers for a\n        # request to an authorized resource\n        my $headers = $auth-\u003emake_authentication_headers($resource_url,$http_method);\n\n        #..do you curl..lwp::agent..or what ever with the headers\n    }\n\n# INSTALLATION\n\nSee the [https://metacpan.org/dist/Web-Solid-Auth/source/INSTALL](https://metacpan.org/dist/Web-Solid-Auth/source/INSTALL) file in the \ndistribution.\n\n# DESCRIPTION\n\nThis is a Solid-OIDC implementation of a connection class for the Solid\nserver. Use the `bin/solid_auth.pl` command as a command line implementation.\nCheck out the `example` directory for a demo web application.\n\n# CONFIGURATION\n\n- webid\n\n    The Solid Webid to authenticate.\n\n- cache\n\n    The location of the cache directory with connection parameters.\n\n# METHODS\n\n- has\\_access\\_token()\n\n    Returns a true value when a cache contains an access token for the `webid`.\n\n- make\\_clean()\n\n    Clear the cache directory.\n\n- make\\_authorization\\_request()\n\n    Return an authorization URL that the use should open to authenticate this\n    application.\n\n- make\\_access\\_token($code)\n\n    When on the redirect url you get a `code` from the authentication server you\n    can use this method to get an access\\_token for the code.\n\n- listen()\n\n    Create a small built-in web server to listen for token responses from the\n    authentication server.\n\n- get\\_access\\_token()\n\n    Return the cached access\\_token.\n\n# SEE ALSO\n\n[solid\\_auth.pl](https://metacpan.org/pod/solid_auth.pl)\n\n# INSPIRATION\n\nThis was very much inspired by the Python solid-flask code by\nRai [http://agentydragon.com](http://agentydragon.com) at [https://gitlab.com/agentydragon/solid-flask](https://gitlab.com/agentydragon/solid-flask),\nand Jeff Zucker's \u0026lt;https://github.com/jeff-zucker\u003e Solid-Shell at [https://www.npmjs.com/package/solid-shell](https://www.npmjs.com/package/solid-shell).\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2021 by Patrick Hochstenbach.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphochste%2Fweb-solid-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphochste%2Fweb-solid-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphochste%2Fweb-solid-auth/lists"}