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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-1.17.0.tar.gz
Algorithm Hash digest
SHA256 4c87fa735fc671f9e283b4f335b553afb52fb4b94743f5c4d88b2b1a16f35f82
MD5 066749fce005fe41311ddf9eb0ce0dbe
BLAKE2b-256 1431187add1947fdb103252852385531565781260d88cded49a3ce5e17fa462e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-1.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb3cc2f31937a52d8e7d69e2849b143bf5e62d1836d1f3f5f087b259bdd68d66
MD5 a7a25fc5c2fa4f8f879c84134727c959
BLAKE2b-256 8f39c32c25bfdc5717e5fbb8cd816e5a212e9ccc8c6c4412cacf2927307bb784

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