Installation

The Tanker identity SDK is distributed via NuGet

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.

string CreateIdentity(string appId, string appSecret, string userId)
Parameters
appId: string The app ID, you can access it from the Tanker dashboard
appSecret: string The app secret, secret that you have saved right after the creation of your app
userId: 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.

string CreateProvisionalIdentity(string appId, string email)
Parameters
appId: string The app ID, you can access it from the Tanker dashboard
email: string The email associated with the provisional identity
Returns
string An 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.

string GetPublicIdentity(SecretPermanentIdentity identity)
Parameters
identity: string An identity or a provisional identity
Returns
string A provisional identity