Everything is an identity. Be it a natural or legal person, a switch, a router, a contract, etc. Every identity requires to have claims and credentials attached. This means identities are at the core of each and every interaction.
Self-Sovereign Identities are independent smart contracts without private key. Rights, roles and permissions are assigned to Principal Acccounts.
Once a Principal Account creates a Self-Sovereign Identity the Principal Account is per default the owner with full rights and permissions. He can add and delegate roles and rights to other accounts.
To create a Self-Sovereign Identity is easy. Just post a JSON file to post.aspx or our websocket API.
POST /post.aspx HTTP/1.1
Host: ssi.codeb.io
Content-Type: application/json
{
“@type”:”specs/commands”,
“@command”:”createssi”,
“username”:”0xc9453926AB622E001fb83DA95271630e12f7a447″,
“password”:”alibaba”
}
whereby the username is the address of the principal account and the password is the password to unlock the private key.
You can also generate a bearer token and pass that via the access_token variable to authenticate. Please note that the bearer token needs “createssi” in its scope as well.
POST /post.aspx HTTP/1.1
Host: ssi.codeb.io
Content-Type: application/json
{
“@type”:”specs/commands”,
“@command”:”createssi”,
“access_token”:”eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImVjY3B1YiI6IlJVTkxNU0FBQUFBWGFUUXlEVzV0TURnb3IySWpKYmdpTHdyeFJ1ZTN4MHNhRmVBSXVRUXlseWFoX2lpT0xxOVdxbDg3MkZrYk52SlkxLTlnRVo3ZkZnQ2VjV0gzTWF2SiJ9.eyJzdWIiOiIweGM5NDUzOTI2QUI2MjJFMDAxZmI4M0RBOTUyNzE2MzBlMTJmN2E0NDciLCJVc2VyUHViS2V5IjoiMHgwNGMzNGFmZDhkZDQwMDBiYTU1NjQyMjAxZDU1NjNlOWE1ZmJlYTZkNTA5MDIwYThkYTczZjRkMzBjNzAwMzA4NTQ4M2ZiZDk0ZjgxYWU1MGZkNDkwZjVlZGM0NzY1NmNjNTJiNGE0MjFkY2NmZGQzODU0Y2QxMGFhMjhkMGQzYzNkIiwiYXV0aF90aW1lIjoiMTYwODIyMDY5OSIsImlhdCI6IjE2MDgyMjA2OTgiLCJleHAiOiIxNjA4MjIxMjk4Iiwibm9uY2UiOiI5MTVhNTAzNzIzYWI0NjQ0ODhiMThmN2EyMzg4ZTcxNyJ9.qbhveuibdTd_QlNL7joMeC96N7a0DKmDDv-cKjt28A628wT0fs6rNyT_f4g5r_apuWi0suZ2_dKGL6cbVYfICw”
}
The command answers with the address of the self-sovereign identity:
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
{
“result”:”0x58793224f712137de876976d96b3aa480a7316f6″
}