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-1.14.0.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-1.14.0.tar.gz
Algorithm Hash digest
SHA256 fa8e09efa22668298681e5e15b09a3115823d31f55f4a71109375e810c1309ff
MD5 eb1de529dcc2a7592822cbe9683f3c83
BLAKE2b-256 d75799375b819df9a8aafab5aed8c24de002924dadfd55949158c10e074dfc08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-1.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e5874035a4765cf32d0a6a8fb0ba4e6adc83a943e8c06d1f56bab7299a8dc96
MD5 3b6d14546aad4f2fb883c606ec394c10
BLAKE2b-256 5c5cf5160543ae508f9b2e1cec8ade26a57d1061f10d89417d21b52bd5e79a40

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