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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-0.13.3.tar.gz
Algorithm Hash digest
SHA256 e47ba47dc0806b38ec538639de1aecff203835a64c8dee936952a6f9e5973f63
MD5 8ee64d035e8e868a1408306c38118bb6
BLAKE2b-256 a41ba20f2b5847e6d2d6a15834d61c9ba793d925e6fbd9f2a74f91ced0fc9c3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for affinidi_tdk_auth_provider-0.13.3-py3-none-any.whl
Algorithm Hash digest
SHA256 075a6a9db5673d69582f482fc4e9c83abd1d760e5ba98b7401d500a2415c99ce
MD5 7c1f9af0fe69fc1f16e2418eb630e99c
BLAKE2b-256 156fb8148226471d31c3542501f8a23e4b2a550462ce87ff655fce09103b6441

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