Skip to main content

Internal module for managing access tokens

Project description

@affinidi-tdk/auth-provider

Affinidi TDK Internal module for managing access tokens.

Javascript

Install

npm install @affinidi-tdk/auth-provider

Usage

import { AuthProvider } from '@affinidi-tdk/auth-provider'

const authProvider = new AuthProvider({
  apiGatewayUrl,
  keyId,
  tokenId,
  passphrase,
  privateKey,
  projectId,
  tokenEndpoint,
})

const projectScopedToken = await authProvider.fetchProjectScopedToken()

Python

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

Install Python package

After Build Step, run inside python virtual env

pip install dist/python/affinidi_tdk_auth_provider-0.1.4-py3-none-any.whl

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()

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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-0.0.13333.tar.gz
Algorithm Hash digest
SHA256 48fa1318c1907770d61285411a034fb6d45f93cf773aad36bd93998d59955b0f
MD5 943a213b0a12402e70a75b4cef4f226d
BLAKE2b-256 934a89c73cbff109f03fa284dc71360caa29312cb0005f084c3bf53d7d31576c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-0.0.13333-py3-none-any.whl
Algorithm Hash digest
SHA256 54b0376086454d93119972bc074d7c43f1bcaa8b678fec6403135d644eebf310
MD5 cab4e9fbff5363654a193a5063aeb60b
BLAKE2b-256 f9cf51b1333e3b53f67909736de03057d71f1b40fda4b1dc04f897b0e79d1a3b

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