Home Reference Source Test
public class | source

MemoryKeyStore

Static Method Summary

Static Public Methods
public static

Get the ID of the most recently active member.

public static

Keep track of the ID of the most recently active member.

Method Summary

Public Methods
public

async getById(memberId: string, keyId: string): Object

Look up a key by memberId and keyId.

public

async getByLevel(memberId: string, level: string): Object

Look up a key by memberId and level.

public

async listKeys(memberId: string): Object

Return list of member's keys.

public

async put(memberId: string, keyPair: Object): Object

Store a member's key pair.

Static Public Methods

public static getActiveMemberId(): string source

Get the ID of the most recently active member.

Return:

string

ID of member

public static setActiveMemberId(memberId: string) source

Keep track of the ID of the most recently active member.

Params:

NameTypeAttributeDescription
memberId string

ID of member

Public Methods

public async getById(memberId: string, keyId: string): Object source

Look up a key by memberId and keyId.

Params:

NameTypeAttributeDescription
memberId string

ID of member

keyId string

key ID

Return:

Object

key pair

public async getByLevel(memberId: string, level: string): Object source

Look up a key by memberId and level.

Params:

NameTypeAttributeDescription
memberId string

ID of member

level string

'LOW', 'STANDARD', or 'PRIVILEGED'

Return:

Object

key pair

public async listKeys(memberId: string): Object source

Return list of member's keys.

Params:

NameTypeAttributeDescription
memberId string

ID of member

Return:

Object

list of keys

public async put(memberId: string, keyPair: Object): Object source

Store a member's key pair.

Params:

NameTypeAttributeDescription
memberId string

ID of member

keyPair Object

key pair to store

Return:

Object

the stored key pair