0 purchases
affiniditdkauthprovider 1.26.2
@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 [email protected]: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
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.