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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-0.13.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f28ceb341ecf05ceddf9c968b3c37a2f9dc5fa2845e0d5ccaf94b8313cf4173
MD5 8897f4606ea87b09658f4c851f02d8fc
BLAKE2b-256 a36b4b1c6b864aaa3ab83ac8c3640f5bd985e16b23a6a5a21a45cfee8d8caf85

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