Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

affinidi_tdk_auth_provider-1.26.1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file affinidi_tdk_auth_provider-1.26.1.tar.gz.

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-1.26.1.tar.gz
Algorithm Hash digest
SHA256 5b6e4f2170242096cb2c53e7aa00f0e8a3f30f3ca1974d74e9440fb4e4260670
MD5 41b69e7242dbd6723bbe8de12d8dd5b2
BLAKE2b-256 88667e665a23ae7d1871acedc2f368383fb61a3556ebeff8bedfcb20d0fcd8d8

See more details on using hashes here.

File details

Details for the file affinidi_tdk_auth_provider-1.26.1-py3-none-any.whl.

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-1.26.1-py3-none-any.whl
Algorithm Hash digest
SHA256 86a160be513b0a09413badc00427ec05a0c596397baab85f418e40dad2f007cb
MD5 a1cf02bd31b1f009fe6bc4d8a9878982
BLAKE2b-256 d0eaf7da2cd12b2d119fa1fadd06cf149d17dc06842ec8384ec850b72a657449

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page