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.28.0.tar.gz
.
File metadata
- Download URL: affinidi_tdk_auth_provider-1.28.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.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1b488c27526331112494679419d1ab93152aefebd05527ef7b9d3286a773b98 |
|
MD5 | e53e5bdd0bba89496f903b9856d89077 |
|
BLAKE2b-256 | b351011bc4afb605f23ce336f2a058bb4db67049c5401f80f0d8bf5535e234a4 |
File details
Details for the file affinidi_tdk_auth_provider-1.28.0-py3-none-any.whl
.
File metadata
- Download URL: affinidi_tdk_auth_provider-1.28.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.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b8c9f58fe0da2b8c7121355fd693c5af414377211fe93a8061616bcc4a7b574 |
|
MD5 | 79ecbc367ae758afd2d453b158b8ef78 |
|
BLAKE2b-256 | 52d1b0274054ef751f4f5a43267cfffe6cfb4a6bdd0916d1a8b33426ec97d74c |