Skip to content

Do we have multitanency feature in Walt id ssi kits like we have in aca-py agent. ? #10

Answered by waltkb
SethiShivam asked this question in Help
Discussion options

You must be logged in to vote

Yes, we call it "Context" and use the "ContextManager" to specify which context to use. Please see the example below:

val userAContext = TestContext("userA")
val userBContext = TestContext("userB")

@Test
fun testContext() {

    var did1: String? = null
    ContextManager.runWith(userAContext) {
        did1 = DidService.create(DidMethod.key)
    }

    ContextManager.runWith(userBContext) {
        val did2 = DidService.create(DidMethod.key)
        val didList2 = DidService.listDids()
        didList2 shouldHaveSize 1
        didList2.first() shouldBe did2
    }

    ContextManager.runWith(userAContext) {
        val didList1 = DidService.listDids()
        didList1 shouldHaveSize 1

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by waltkb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
SSI Kit Everything related to the SSI Kit.
2 participants