Internal module for managing access tokens
Project description
@affinidi-tdk/auth-provider
Affinidi TDK Internal module for managing access tokens.
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 = {
apiGatewayUrl,
keyId,
tokenId,
passphrase,
privateKey,
projectId,
tokenEndpoint,
}
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({
apiGatewayUrl,
keyId,
tokenId,
passphrase,
privateKey,
projectId,
tokenEndpoint,
})
const projectScopedToken = await authProvider.fetchProjectScopedToken()
Mnually 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
pip install dist/python/affinidi_tdk_auth_provider-0.1.4-py3-none-any.whl
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.15.0.tar.gz
.
File metadata
- Download URL: affinidi_tdk_auth_provider-1.15.0.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f123e141232cf57c1def0f562738296e73b6e4505b7a0f002505a4f708c61bf |
|
MD5 | c34e3bdd94d5c943df045a6a5bfc69d4 |
|
BLAKE2b-256 | ea7a7b943184ac4d6ba5742b7672079cb13253696bb4060ccb83e8f558a10e1d |
File details
Details for the file affinidi_tdk_auth_provider-1.15.0-py3-none-any.whl
.
File metadata
- Download URL: affinidi_tdk_auth_provider-1.15.0-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5c73e18a460661ed1e0e960708db79abd1d535bd7b0180b07dbb2f9f0b32423 |
|
MD5 | defb75610c5ea690670164f85f2268fe |
|
BLAKE2b-256 | d6d24057a31bbb579bbf71420824ece2f7ab46bb8b85f16609944f009ba8fca1 |