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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-1.20.0.tar.gz
Algorithm Hash digest
SHA256 c846e10f835a0b4e1bf096c9080af049125d1fe93ac506528296a13770ddd6ea
MD5 80e062a4c25636474bec0f49915feb2b
BLAKE2b-256 5a5036e38dd8065c5bbec1b67692987a24e1710fc5ad715ec5a6b90b97dd6da1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-1.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a9bd0d7469c098e0459afd6ec4bc87ea08a870a3fab2e8699e808c1ff8515ee
MD5 a946ef67b3695f9eaec9987042fa21a7
BLAKE2b-256 f3953339385ab8b29220642a0ec79adf5ed71f5750e4ee1ceb0ec9ee55a156f0

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