Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Identity / IdentityProvider #8

Open
@thiagodelgado111

Description

@thiagodelgado111

I was looking at the feat/identity PR again. This is how the Identity looks now on the left and how I imagine it could look on the right (sorry for the horrible handwriting):

image

Key

  • publicKey : String | Buffer
  • privateKey : String | Buffer
  • encoding : String (e.g: hex)

The basic Identity object would look like this:

  • id: String
  • key: Key
  • provider : IdentityProvider (?)
  • type: String (eg. ColonyIdentity, Ethereum address, IPFS PeerID, Dat address, DID, even Twitter can be an IdentityProvider)
  • sign: (e: Object) => { key: Key, signature: String }
  • verify : (e: Entry) => boolean
  • (signature) orbitKeyOwnershipProof : String
  • (pkSignature) externalIdentityOwnershipProof : String

sign and verify would be provided by the IdentityProvider so when we create an identity the object get a hold on whatever the implementation is.

This way we don't need to pass the provider to the log but just the identity object which will be responsible for signing and verifying entries (and to provide the necessary info for the AccessController canAppend method).

How does it sound?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions