Solid Client Credentials
Solid authentication with client credentials.
Setup
Requirements
- Python 3.10+ (likely works with lower versions, but not tested)
Installation
$ pip install SolidClientCredentials
Use Case
!!! note Client credentials are not standardized, thus you can't run your application through any Solid pod. However, users from any provider can give your app access through standardized mechanisms (eg ACL).
You can use client credentials to create a server-side application that authenticates as a webId on ESS or CSS. After obtaining the client credentials for a webId, you can use them to make authenticated requests on behalf of this account. You will be able to access all resources this webId has access to. If you want to access data of other users, they must grant access rights to your apps webId.
Usage
To use this package you first need valid client credentials (see below). Given the client credentials you can use it as follows:
from solid_client_credentials import SolidClientCredentialsAuth, DpopTokenProvider
import requests
client_id = 'your-id'
client_secret = 'your-secret'
# The server that provides your account (where you login)
issuer_url = 'https://login.inrupt.com'
# create a token provider
token_provider = DpopTokenProvider(
issuer_url=issuer_url,
client_id=client_id,
client_secret=client_secret
)
# use the tokens with the requests library
auth = SolidClientCredentialsAuth(token_provider)
res = requests.get('https://example.org/private/stuff', auth=auth)
print(res.text)
Obtaining client credentials
This is currently only possible with ESS and CSS.
ESS
ESS allows to manually obtain client credentials: https://login.inrupt.com/registration.html
CSS
CSS allows to automatically obtain client credentials: https://communitysolidserver.github.io/CommunitySolidServer/5.x/usage/client-credentials/
You can also look at css_utils.py to see how this maps to python.
Metadata
Release files for SolidClientCredentials 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| solidclientcredentials-1.0.3.tar.gz | 6.3 kB | Without provenance | Details for solidclientcredentials-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| solidclientcredentials-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for solidclientcredentials-1.0.3-py3-none-any.whl |
Total release size: 15.4 kB
Release files / solidclientcredentials-1.0.3.tar.gz
| Download URL | solidclientcredentials-1.0.3.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61f26a00657af401a7362772682af658419db2076b6b2418c1fc011eb6b7c890
|
|
BLAKE2b-256 checksum How to use checksums |
aa9cd36869d76b20ab8516ef7bed55b2d7f924b684ec63af2cf5557abae4508a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.12.3 Linux/6.11.0-17-generic
|
Release files / solidclientcredentials-1.0.3-py3-none-any.whl
| Download URL | solidclientcredentials-1.0.3-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28a814d7b9a1353be104d81fa7f0abf416a96406a711fb34eb3630ee7861aef9
|
|
BLAKE2b-256 checksum How to use checksums |
dd21b9eca20d224eb7268b6b66291aa2ec00a860f00a086df1986acd1496ceb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.12.3 Linux/6.11.0-17-generic
|
Security for SolidClientCredentials 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.