public class EcIdentityManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.stjs.javascript.Array<EcContact> |
contacts
Contacts (Keys that we do not own)
|
static org.stjs.javascript.Array<EcIdentity> |
ids
The current user's owned identities (keys+displayName)
|
static org.stjs.javascript.functions.Callback1<EcContact> |
onContactChanged
Contacts change hook.
|
static org.stjs.javascript.functions.Callback1<EcIdentity> |
onIdentityChanged
Identity change hook.
|
static Object |
signatureSheetCache |
static boolean |
signatureSheetCaching |
| Constructor and Description |
|---|
EcIdentityManager() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addContact(EcContact contact)
Adds a contact to the identity manager.
|
static void |
addContactQuietly(EcContact contact)
Adds a contact to the identity manager.
|
static void |
addIdentity(EcIdentity identity)
Adds an identity to the identity manager.
|
static void |
addIdentityQuietly(EcIdentity identity)
Adds an identity to the identity manager.
|
static void |
clearContacts()
Clears contacts from the local storage
|
static void |
clearIdentities()
Clears identities from the local storage
|
static void |
contactChanged(EcContact contact)
Trigger for the onContactChanged hook
|
static EbacSignature |
createSignature(long duration,
String server,
EcPpk ppk)
Create a signature for a specific identity, authorizing movement of data
outside of our control.
|
static EcContact |
getContact(EcPk pk)
Get Contact from PK (if we have it)
|
static EcIdentity |
getIdentity(EcPk pk)
Get Identity from PK (if we have it)
|
static org.stjs.javascript.Array<EcPk> |
getMyPks() |
static EcPpk |
getPpk(EcPk fromPem)
Get PPK from PK (if we have it)
|
static void |
identityChanged(EcIdentity identity)
Trigger for the onIdentityChanged hook
|
static void |
main(String[] args) |
static String |
myIdentitiesSearchString() |
static void |
readContacts()
Reads contact data from localstorage.
|
static void |
readIdentities()
Reads contact data from localstorage.
|
static void |
saveIdentities()
Writes contact data to localstorage.
|
static void |
sign(org.cassproject.schema.general.EcRemoteLinkedData d)
Sign a piece of data with all available keys that own that data.
|
static String |
signatureSheet(long duration,
String server)
Create a signature sheet for all identities, authorizing movement of data
outside of our control.
|
static void |
signatureSheetAsync(long duration,
String server,
org.stjs.javascript.functions.Callback1<String> success,
org.stjs.javascript.functions.Callback1<String> failure)
Asynchronous version of creating a signature sheet for all identities
|
static String |
signatureSheetFor(org.stjs.javascript.Array<String> identityPksinPem,
long duration,
String server)
Create a signature sheet, authorizing movement of data outside of our
control.
|
static void |
signatureSheetForAsync(org.stjs.javascript.Array<String> identityPksinPem,
long duration,
String server,
org.stjs.javascript.functions.Callback1<String> success,
org.stjs.javascript.functions.Callback1<String> failure)
Asynchronous version of creating a signature sheet for a list of
identities
|
public static org.stjs.javascript.Array<EcIdentity> ids
public static org.stjs.javascript.Array<EcContact> contacts
public static org.stjs.javascript.functions.Callback1<EcIdentity> onIdentityChanged
public static org.stjs.javascript.functions.Callback1<EcContact> onContactChanged
public static boolean signatureSheetCaching
public static Object signatureSheetCache
public static void main(String[] args)
public static void identityChanged(EcIdentity identity)
{EcIdentity} - identity Identity that has changedpublic static void contactChanged(EcContact contact)
{EcContact} - contact Contact that has changedpublic static void readContacts()
public static void readIdentities()
public static void saveIdentities()
public static void clearContacts()
public static void clearIdentities()
public static void addIdentity(EcIdentity identity)
{EcIdentity} - identity Identity to add.public static void addIdentityQuietly(EcIdentity identity)
{EcIdentity} - identity Identity to add.public static void addContact(EcContact contact)
{EcContact} - contact Contact to add.public static void addContactQuietly(EcContact contact)
{EcContact} - contact Contact to add.public static String signatureSheetFor(org.stjs.javascript.Array<String> identityPksinPem, long duration, String server)
{String[]} - identityPksinPem Which identities to create signatures
for.{long} - duration Length of time in milliseconds to authorize
control.{String} - server Server that we are authorizing.public static void signatureSheetForAsync(org.stjs.javascript.Array<String> identityPksinPem, long duration, String server, org.stjs.javascript.functions.Callback1<String> success, org.stjs.javascript.functions.Callback1<String> failure)
{String[]} - identityPksinPem Which identities to create signatures
for.{long} - duration Length of time in milliseconds to authorize
control.{String} - server Server that we are authorizing.{Callback1} - success Callback triggered once the signature
sheet has been created, returns the signature sheetpublic static String signatureSheet(long duration, String server)
{long} - duration Length of time in milliseconds to authorize
control.{String} - server Server that we are authorizing.public static void signatureSheetAsync(long duration,
String server,
org.stjs.javascript.functions.Callback1<String> success,
org.stjs.javascript.functions.Callback1<String> failure)
{long} - duration Length of time in milliseconds to authorize
control.{String} - server Server that we are authorizing.{Callback} - success Callback triggered once the signature
sheet has been created, returns the signature sheetpublic static EbacSignature createSignature(long duration, String server, EcPpk ppk)
{long} - duration Length of time in milliseconds to authorize
control.{String} - server Server that we are authorizing.{EcPpk} - ppk Key of the identity to create a signature forpublic static EcPpk getPpk(EcPk fromPem)
{EcPk} - fromPem PK to use to look up PPKpublic static EcContact getContact(EcPk pk)
{EcPk} - pk PK to use to look up PPKpublic static EcIdentity getIdentity(EcPk pk)
{EcPk} - pk PK to use to look up PPKpublic static void sign(org.cassproject.schema.general.EcRemoteLinkedData d)
{EcRemoteLinkedData} - d Data to sign.public static String myIdentitiesSearchString()
public static org.stjs.javascript.Array<EcPk> getMyPks()
Copyright © 2018 Eduworks Corporation. All rights reserved.