Blockstack login unique identifier

Hi guys,
I am implementing Blockstack login on my client’s app http://app.prism.io using the following library:
https://pypi.python.org/pypi/django-blockstack-auth/0.1.3

This is all I get from this python library

My question is:
Which one of those parameters is the unique identifier of the user on the app?
My guess is that public_keys is what I am searching for, but I am skeptik because it is an array and not a single value and on the official library Blockstack.js the unique key is called appPrivateKey (while on this Python library it’s called public_key),

Thanks,
Stefano

Hey @stefanopochet,

The Python package was produced by a member of the dotpodcast project. I’m not sure he’s on this forum, but you can ask him directly via the Github page: https://github.com/dotpodcast/django-blockstack-auth.

Hi Jude,
thanks for your reply.
I actually see they are using the JWT decode function, which you are using as well on Blockstack.js (blockstack.decodeToken(token) ).

Could you please help me understand how to get an appPrivateKey from any data I get from blockstack.decodeToken?
This is all I get from blockstack.decodeToken:

Thanks

Gotcha.

The appPrivateKey field an encrypted ECDSA private key. It is encrypted with the transit public key—the public key of the ECDSA private key you used to sign the authentication request. You can see how it is generated in this source file: https://github.com/blockstack/blockstack.js/blob/master/src/auth/authMessages.js In particular, makeAuthResponse() generates the token you get back.