Skip to main content

Tanker identity library

Project description

Tanker identity generation in Python for the Tanker SDK.

https://travis-ci.org/TankerHQ/identity-python.svg?branch=master https://img.shields.io/pypi/v/tankersdk_identity.svg https://img.shields.io/codecov/c/github/TankerHQ/identity-python.svg?label=Coverage

Installation

With pip:

$ pip install tankersdk-identity

API

tankersdk_identity.create_identity(app_id, app_secret, user_id)

Create a new Tanker identity. This identity is secret and must only be given to a user who has been authenticated by your application. This identity is used by the Tanker client SDK to open a Tanker session

app_id

The app ID. You can access it from the Tanker dashboard.

app_secret

The app secret. A secret that you have saved right after the creation of your app.

user_id

The ID of a user in your application.

tankersdk_identity.create_provisional_identity(app_id, email)

Create a Tanker provisional identity. It allows you to share a resource with a user who does not have an account in your application yet.

app_id

The app ID. You can access it from the Tanker dashboard.

email

The email of the potential recipient of the resource.

tankersdk_identity.get_public_identity(identity)

Return the public identity from an identity. This public identity can be used by the Tanker client SDK to share encrypted resource.

identity

A secret identity.

tankersdk_identity.upgrade_user_token(app_id, user_id, user_token)

Return a Tanker identity from Tanker v1 user Token. Tanker v1 used a user token, when migrating to Tanker v2 you should use this function to migrate you used tokens to identities. This identity is secret and must only be given to a user who has been authenticated by your application. This identity is used by the Tanker client SDK to open a Tanker session

app_id

The app ID. You can access it from the Tanker dashboard.

user_id

The ID of a user in your application.

user_token

The Tanker v1 user token.

Going further

Read more about identities in the Tanker guide.

Check the examples folder for usage examples.

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

tankersdk-identity-1.2.1.tar.gz (8.6 kB view details)

Uploaded Source

File details

Details for the file tankersdk-identity-1.2.1.tar.gz.

File metadata

  • Download URL: tankersdk-identity-1.2.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.5rc1

File hashes

Hashes for tankersdk-identity-1.2.1.tar.gz
Algorithm Hash digest
SHA256 5468bb58c22e2e90cfc8539a4d5e7ee7ff3b6b74cafa578b4c6ce84866a879c7
MD5 81325fd4e68972b3f79974ddd021fc5f
BLAKE2b-256 be867583fc72816f1c9177be2a057587aa9242dd0bbace9f8f0625ca343a60ef

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