Installation

The Tanker identity SDK is distributed as a pypi package

Supported platforms

The identity SDK is compatible with Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8

Create identity

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.

def create_identity(app_id, app_secret, user_id):
Parameters
app_id: string The app ID, you can access it from the Tanker dashboard
app_secret: string The app secret, secret that you have saved right after the creation of your app
user_id: string The unique ID of a user in your application
Returns
string An identity

Provisional identity

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. It must be served to an authenticated user, and attached client-side to access the resource. You will need to verifiy the associated email.

def create_provisional_identity(app_id, email):
Parameters
app_id: string The app ID, you can access it from the Tanker dashboard
email: string The email associated with the provisional identity
Returns
string A provisional identity

Public identity

Return the public identity from an identity or a provisional identity. This public identity can be used by the Tanker client SDK to share encrypted resources and add users to groups.

def get_public_identity(identity):
Parameters
identity: string An identity or a provisional identity
Returns
string A public identity