-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(agent): integrate key-manage into prism-agent server (#77)
* feat(agent): add keystore subproject * feat(agent): add intefaces & models for custodian layer * docs(agent): add readme about key-mangement * feat(agent): fix as reviewed * feat(agent): implement InMemoryDIDKeyStorage * feat(agent): add tests for InMemoryDIDKeyStorage * feat(agent): add createCustodialDID endpoint * feat(agent): refine createCustodialDID endpoint * feat(agent): refine createCustodialDID endpoint * feat(agent): make DIDKeyStorage use PrismDID * feat(castor): add LongFormPrismDID model * feat(agent): add DID commitment storage * feat(agent): add key generation in ManagedDIDService * feat(agent): fix failing test * feat(agent): resolve merge conflict * feat(agent): rename OAS model to avoid confusion * feat(agent): rename subproject away from custodian * feat(agent): make prism-crypto key generator works * feat(agent): add tests for prism-crypto int conversion * feat(agent): store DID secret when create * feat(agent): add validation when createManagedDID * feat(agent): add DIDNonSecretStorage & duplicated DID validation * feat(agent): add ability to publish stored did * feat(agent): add commitment value InMemorySecretStorage tests * feat(agent): add createAndStoreDID tests * feat(agent): add tests for publishStoredDID * feat(prism-agent): pr diff cleanup * style(shared): run formatter on shared * fix(iris): align type signature * feat(agent): rename keymanagement to walletapi * feat(agent): add mock stub & link ManagedDIDService to HTTP server * feat(agent): integrate publishStoredDID in HTTP server * feat(agent): integrate createManagedDID in HTTP server
- Loading branch information
Showing
9 changed files
with
216 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...main/scala/io/iohk/atala/agent/server/http/marshaller/DIDRegistrarApiMarshallerImpl.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.iohk.atala.agent.server.http.marshaller | ||
|
||
import akka.http.scaladsl.marshalling.ToEntityMarshaller | ||
import akka.http.scaladsl.unmarshalling.FromEntityUnmarshaller | ||
import io.iohk.atala.agent.openapi.api.DIDRegistrarApiMarshaller | ||
import io.iohk.atala.agent.openapi.model.{ | ||
CreateManagedDIDResponse, | ||
CreateManagedDidRequest, | ||
DIDOperationResponse, | ||
ErrorResponse | ||
} | ||
import spray.json.RootJsonFormat | ||
import zio.* | ||
|
||
object DIDRegistrarApiMarshallerImpl extends JsonSupport { | ||
|
||
val layer: ULayer[DIDRegistrarApiMarshaller] = ZLayer.succeed { | ||
new DIDRegistrarApiMarshaller: | ||
override implicit def fromEntityUnmarshallerCreateManagedDidRequest | ||
: FromEntityUnmarshaller[CreateManagedDidRequest] = summon[RootJsonFormat[CreateManagedDidRequest]] | ||
|
||
override implicit def toEntityMarshallerDIDOperationResponse: ToEntityMarshaller[DIDOperationResponse] = | ||
summon[RootJsonFormat[DIDOperationResponse]] | ||
|
||
override implicit def toEntityMarshallerCreateManagedDIDResponse: ToEntityMarshaller[CreateManagedDIDResponse] = | ||
summon[RootJsonFormat[CreateManagedDIDResponse]] | ||
|
||
override implicit def toEntityMarshallerErrorResponse: ToEntityMarshaller[ErrorResponse] = | ||
summon[RootJsonFormat[ErrorResponse]] | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.