Internal module for managing access tokens
Project description
@affinidi-tdk/auth-provider
Affinidi TDK internal module for managing access token (project scoped token) to Affinidi services via Affinidi TDK clients.
Pre-requisites
To initialize AuthProvider, Personal Access Token (PAT) details should be provided. To create PAT, use Affinidi CLI's create-token command.
affinidi token create-token -n MyNewToken -w -p YOUR-SECRET-PASSPHRASE
This command will return you variables to initialize AuthProvider.
Install
Javascript
npm install @affinidi-tdk/auth-provider
Python
Install Python package
run inside python virtual env
pip install affinidi_tdk_auth_provider
Usage
Python package usage
import affinidi_tdk_auth_provider
stats = {
keyId,
tokenId,
passphrase,
privateKey,
projectId,
}
authProvider = affinidi_tdk_auth_provider.AuthProvider(stats)
projectScopedToken = authProvider.fetch_project_scoped_token()
Javascript package usage
import { AuthProvider } from '@affinidi-tdk/auth-provider'
const authProvider = new AuthProvider({
keyId,
tokenId,
passphrase,
privateKey,
projectId,
})
const projectScopedToken = await authProvider.fetchProjectScopedToken()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file affinidi_tdk_auth_provider-1.33.2.tar.gz.
File metadata
- Download URL: affinidi_tdk_auth_provider-1.33.2.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1062f1a439355a344e1267f85a9ae4fce213d82288e24896f88c8ad2bdd006f3
|
|
| MD5 |
bd6c04c7c288df7c9695cf493d425416
|
|
| BLAKE2b-256 |
dc6baa454daca3d15ad2ea612a54181a62df647a762105b1fcfd295aca70a1b1
|
File details
Details for the file affinidi_tdk_auth_provider-1.33.2-py3-none-any.whl.
File metadata
- Download URL: affinidi_tdk_auth_provider-1.33.2-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87173f8fdc5746a7b06e3966877b6371bb10671f0fc6ab6da8852cf57a825e94
|
|
| MD5 |
8715f072fd667c9971dc900348719305
|
|
| BLAKE2b-256 |
63fa8b5a3fab8c6908cfe7afe569449255c6e183b9843342d412d9305813f158
|