mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
27 lines
757 B
JavaScript
27 lines
757 B
JavaScript
class IdentityProvider {
|
|
/* Return id of identity (to be signed by orbit-db public key) */
|
|
async getId (options) {}
|
|
|
|
/* Return signature of OrbitDB public key signature */
|
|
async signIdentity (data, options) {}
|
|
|
|
/* Verify a signature of OrbitDB public key signature */
|
|
static async verifyIdentity (identity) {}
|
|
|
|
/* Return the type for this identity provider */
|
|
static get type () {
|
|
throw new Error('\'static get type ()\' needs to be defined in the inheriting class')
|
|
}
|
|
|
|
/*
|
|
Return the type for this identity-procider
|
|
NOTE! This is the only property of the interface that
|
|
shouldn't be overridden in the inherited IdentityProvider
|
|
*/
|
|
get type () {
|
|
return this.constructor.type
|
|
}
|
|
}
|
|
|
|
export default IdentityProvider
|