Identity Wallet

Created by

Vlad Tomsa

Last updated Nov 06, 2018

Creating account

The first step when creating your PERSONA identity is registering for a new account.

First you need to submit your desired username and email address. Persona Identity server (identity service) will validate the uniqueness of your email. If credentials are valid, the server will create an account and set a `sendRegistrationEmail` flag to false.

On the server, there is an emailSender task that starts every 15 seconds. It checks each newly created user with the `sendRegistrationEmail` flag set to false and if there are new users, we iterate each of them. On each iteration we generate a registration token (available 24 hours) and send them an email with the account confirmation link containing this token.

After receiving this link (available only 24 hours) the user has to create his password and confirm it.

Creating the PERSONA(blockchain) account

After submitting the valid password form on the client side (browser) an Persona address-passphrase key pair is generated. This address is also send, along with the new password to the identity service that stores the password and trigger the process of adding a certain amount of Persona tokens needed to add the minimum set of attributes.

After the password is saved, we display to the user his Persona Address and his passphrase.

Adding attributes

On the chain, we have a set of `attribute types`. These types have the fallowing definition:  name, type, validation, options.

insert into attribute_types (name,data_type,validation) VALUES ('first_name','text', '{"required": true, "minLength": 2, "maxLength": 80}');
insert into attribute_types (name,data_type,validation) VALUES ('last_name','text', '{"required": true, "minLength": 2, "maxLength": 80}');
insert into attribute_types (name,data_type,validation) VALUES ('ssn','text', '{"required": true, "minLength": 2, "maxLength": 80}');
insert into attribute_types (name,data_type,validation) VALUES ('alias','text', '{"required": true, "minLength": 2, "maxLength": 80}');
insert into attribute_types (name,data_type,validation) VALUES ('date_of_birth','date', '{"required": true}');
insert into attribute_types (name,data_type,validation,options) VALUES ('address','text', '{"required": true, "minLength": 2, "maxLength": 80}', '{"type": "textarea"}');
insert into attribute_types (name,data_type,validation) VALUES ('birthplace','text', '{"required": true, "minLength": 2, "maxLength": 80}');
insert into attribute_types (name,data_type,validation,options) VALUES ('email','text','{"required": true, "minLength": 2, "maxLength": 80, "pattern": "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}" }', '{"type":"email"}');
insert into attribute_types (name,data_type,validation) VALUES ('phone_number','text','{"required": true, "minLength": 2, "maxLength": 80}');
insert into attribute_types (name,data_type,validation) VALUES ('mothers_name','text','{"required": true, "minLength": 2, "maxLength": 80}');
insert into attribute_types (name,data_type,validation) VALUES ('fathers_name','text','{"required": true, "minLength": 2, "maxLength": 80}');
insert into attribute_types (name,data_type,validation, options) VALUES ('identity_card','file', '{"required":true}','{"accept": ["image/*",".pdf"], "maxSize": 10485760, "expirable": true}');

For each attribute type the identity wallet has the option to create an user attribute. For logged in users this form is accessible at the identity page.

File types are also supported as attributes. Files are added to the PERSONA IPFS NETWORK.

Attribute expiration date

Some attribute types have a expirable option set on their configuration.

When creating/editing such an attribute an expiration time picker is presented to the user . This field is required in order to submit the attribute form.

Editing attributes

Once an attribute is created, the owner has the option to edit it, by accessing the specific attribute. The user needs to enter the SHOW VALUE mode on the attribute in order to have access to the edit option.

When editing an attribute, it and all its associated attributes will be invalidated. This means that the entire notarisation process needs to started from 0.

Associating attributes

For this version, our platform allows each file type document to have associations with plain-text or file attributes.

Creating an association means the the file attribute is the "owner" of the associated attributes.

Only existing attributes can be associated to a file attribute.