Internal module for managing access tokens
Project description
@affinidi-tdk/auth-provider
Affinidi TDK Internal module for managing access tokens.
Javascript
Install
npm install @affinidi-tdk/auth-provider
Usage
import { AuthProvider } from '@affinidi-tdk/auth-provider'
const authProvider = new AuthProvider({
apiGatewayUrl,
keyId,
tokenId,
passphrase,
privateKey,
projectId,
tokenEndpoint,
})
const projectScopedToken = await authProvider.fetchProjectScopedToken()
Python
Build JSII python package
This is step is required, as python package is not published to pypi.org yet
git clone git@github.com:affinidi/affinidi-tdk.git
cd packages/auth-provider/
npm i --prefix .
npm run build
npm run package
Install Python package
After Build Step, run inside python virtual env
pip install dist/python/affinidi_tdk_auth_provider-0.1.4-py3-none-any.whl
Python package usage
import affinidi_tdk_auth_provider
stats = {
apiGatewayUrl,
keyId,
tokenId,
passphrase,
privateKey,
projectId,
tokenEndpoint,
}
authProvider = affinidi_tdk_auth_provider.AuthProvider(stats)
projectScopedToken = authProvider.fetch_project_scoped_token()
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
File details
Details for the file affinidi_tdk_auth_provider-1.14.0.tar.gz
.
File metadata
- Download URL: affinidi_tdk_auth_provider-1.14.0.tar.gz
- Upload date:
- Size: 47.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa8e09efa22668298681e5e15b09a3115823d31f55f4a71109375e810c1309ff |
|
MD5 | eb1de529dcc2a7592822cbe9683f3c83 |
|
BLAKE2b-256 | d75799375b819df9a8aafab5aed8c24de002924dadfd55949158c10e074dfc08 |
File details
Details for the file affinidi_tdk_auth_provider-1.14.0-py3-none-any.whl
.
File metadata
- Download URL: affinidi_tdk_auth_provider-1.14.0-py3-none-any.whl
- Upload date:
- Size: 46.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e5874035a4765cf32d0a6a8fb0ba4e6adc83a943e8c06d1f56bab7299a8dc96 |
|
MD5 | 3b6d14546aad4f2fb883c606ec394c10 |
|
BLAKE2b-256 | 5c5cf5160543ae508f9b2e1cec8ade26a57d1061f10d89417d21b52bd5e79a40 |