Skip to main content

Internal module for managing access tokens

Reason this release was yanked:

wrong

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

Uploaded Source

Built Distribution

affinidi_tdk_auth_provider-0.0.1-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f21db24fa415d1f7be66e200dd25b23ea0aa952663d4b6ca9a620d424d0e900b
MD5 6a0bead97e795f7983b598719410ab0c
BLAKE2b-256 8eb448796c1d7e9270aa39e988c8bebb6e8bca49a15bbe3b432ed0f2778cfd87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 701480c04bbf8bac8258f4399d575cc8707a720b1358be11e1f9dadf3a93d949
MD5 f9d61aa1034c94b2cc85865b10972d29
BLAKE2b-256 eb275ad6f01b3723c5a6a80e712224f45a762d57d7c22e9da3fcd16886c877ca

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