# @affinidi-tdk/auth-provider
Affinidi TDK Internal module for managing access tokens.
## Install
### Javascript
```bash
npm install @affinidi-tdk/auth-provider
```
## Python
### Install Python package
run inside [python virtual env](https://docs.python.org/3/library/venv.html)
```bash
pip install affinidi_tdk_auth_provider
```
## Usage
### Python package usage
```python
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
```python
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
```bash
git clone git@github.com:affinidi/affinidi-tdk.git
cd packages/auth-provider/
npm i --prefix .
npm run build
npm run package
```
```bash
pip install dist/python/affinidi_tdk_auth_provider-0.1.4-py3-none-any.whl
```
Raw data
{
"_id": null,
"home_page": "https://github.com/affinidi/affinidi-tdk#readme",
"name": "affinidi-tdk-auth-provider",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Affinidi",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/f6/34/875a741863662a168b0d606f51092848959af473f93e94f11b097d2e7b08/affinidi_tdk_auth_provider-1.30.0.tar.gz",
"platform": null,
"description": "# @affinidi-tdk/auth-provider\n\nAffinidi TDK Internal module for managing access tokens.\n\n## Install\n\n### Javascript\n\n```bash\nnpm install @affinidi-tdk/auth-provider\n```\n\n## Python\n\n### Install Python package\n\nrun inside [python virtual env](https://docs.python.org/3/library/venv.html)\n\n```bash\npip install affinidi_tdk_auth_provider\n```\n\n## Usage\n\n### Python package usage\n\n```python\nimport affinidi_tdk_auth_provider\n\nstats = {\n apiGatewayUrl,\n keyId,\n tokenId,\n passphrase,\n privateKey,\n projectId,\n tokenEndpoint,\n}\n\nauthProvider = affinidi_tdk_auth_provider.AuthProvider(stats)\n\nprojectScopedToken = authProvider.fetch_project_scoped_token()\n```\n\n### Javascript package usage\n\n```python\nimport { AuthProvider } from '@affinidi-tdk/auth-provider'\n\nconst authProvider = new AuthProvider({\n apiGatewayUrl,\n keyId,\n tokenId,\n passphrase,\n privateKey,\n projectId,\n tokenEndpoint,\n})\n\nconst projectScopedToken = await authProvider.fetchProjectScopedToken()\n```\n\n### Mnually Build JSII python package\n\nThis is step is required, as python package is not published to pypi.org yet\n\n```bash\ngit clone git@github.com:affinidi/affinidi-tdk.git\ncd packages/auth-provider/\nnpm i --prefix .\nnpm run build\nnpm run package\n```\n\n```bash\npip install dist/python/affinidi_tdk_auth_provider-0.1.4-py3-none-any.whl\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Internal module for managing access tokens",
"version": "1.30.0",
"project_urls": {
"Homepage": "https://github.com/affinidi/affinidi-tdk#readme",
"Source": "https://github.com/affinidi/affinidi-tdk"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a6d6e86148218cdb43306fc594982168043225112deefd50c954519a27980510",
"md5": "1ad44d20c31c4a1ce2ba5c4a7e8fae01",
"sha256": "d72ca2bde186f289b47ce9d70fe86835c7731c171b10d1926097166273be7de6"
},
"downloads": -1,
"filename": "affinidi_tdk_auth_provider-1.30.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1ad44d20c31c4a1ce2ba5c4a7e8fae01",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.8",
"size": 1405849,
"upload_time": "2024-12-09T08:49:42",
"upload_time_iso_8601": "2024-12-09T08:49:42.069700Z",
"url": "https://files.pythonhosted.org/packages/a6/d6/e86148218cdb43306fc594982168043225112deefd50c954519a27980510/affinidi_tdk_auth_provider-1.30.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f634875a741863662a168b0d606f51092848959af473f93e94f11b097d2e7b08",
"md5": "a58c7ab175624b7967e7df9efb119192",
"sha256": "5b4570cf9838c11865134d964210a7d1928f4959546f9b4077b9a4a63c2477a5"
},
"downloads": -1,
"filename": "affinidi_tdk_auth_provider-1.30.0.tar.gz",
"has_sig": false,
"md5_digest": "a58c7ab175624b7967e7df9efb119192",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.8",
"size": 1407413,
"upload_time": "2024-12-09T08:49:44",
"upload_time_iso_8601": "2024-12-09T08:49:44.469027Z",
"url": "https://files.pythonhosted.org/packages/f6/34/875a741863662a168b0d606f51092848959af473f93e94f11b097d2e7b08/affinidi_tdk_auth_provider-1.30.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 08:49:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "affinidi",
"github_project": "affinidi-tdk#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "affinidi-tdk-auth-provider"
}