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.33.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

affinidi_tdk_auth_provider-1.33.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-1.33.0.tar.gz
Algorithm Hash digest
SHA256 7c8868413d20f8a2907af8ced27c97114e44ac9962d95d163bc2ef982dabb2f5
MD5 1375ab1142ea6e581c26c19e6c11c4bd
BLAKE2b-256 816b18f84e62519a96d63a01507b706a3c5ce2941435941226ada1d2f2285a89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-1.33.0-py3-none-any.whl
Algorithm Hash digest
SHA256 012c24a4577a26eaa2f11f5c25addc757ab2f539f67af326f37066b223719fa9
MD5 8a9e79809ad11e7cf43acb9ec918710a
BLAKE2b-256 354739a1a8bba9415b52c6baabbd5d614e83c7dd78dcad12eb75598e4b78cb1f

See more details on using hashes here.

Supported by

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