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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-0.0.155.tar.gz
Algorithm Hash digest
SHA256 52283d30c2d887445aafe345065290a016eae109344671d7618d5ad43d2fea91
MD5 900e0b6f8c30de16deff72994043f6b4
BLAKE2b-256 7a2eb628e2f99d64a24edf1ee43d3167c041f83df8a460ac536ca0ce59c4623e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-0.0.155-py3-none-any.whl
Algorithm Hash digest
SHA256 e0159d4944508c5da754b88c9fb5fb75c98d0f04dc3cffeb9423c6a7f093924d
MD5 684ca9bfe4d2d129564ea68ad2334a4a
BLAKE2b-256 ba32df5bf5ed8ca214b37e4f0cf5a2d44b66c98b2ecdd4b34f0e0e288500bc12

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