Class DidWebApi
-
-
Field Summary
Fields Modifier and Type Field Description private final StringmethodName
-
Method Summary
Modifier and Type Method Description final StringgetMethodName()final DidResolutionResultresolve(String did)Resolves a did:jwkURI into a DidResolutionResult.final BearerDidimport(PortableDid portableDid, KeyManager keyManager)Instantiates a BearerDid object for the DID WEB method from a given PortableDid. final BearerDidimport(PortableDid portableDid)Instantiates a BearerDid object for the DID WEB method from a given PortableDid. -
-
Method Detail
-
getMethodName
final String getMethodName()
-
resolve
final DidResolutionResult resolve(String did)
Resolves a
did:jwkURI into a DidResolutionResult.This method parses the provided
didURI to extract the Jwk information. It validates the method of the DID URI and then attempts to parse the Jwk from the URI. If successful, it constructs a DidDocument with the resolved Jwk, generating a DidResolutionResult.The method ensures that the DID URI adheres to the
did:jwkmethod specification and handles exceptions that may arise during the parsing and resolution process.- Parameters:
did- did URI to parse- Returns:
DidResolutionResult containing the resolved DID document. If the DID URI is invalid, not conforming to the
did:jwkmethod, or if any other error occurs during the resolution process, it returns an invalid DidResolutionResult.
-
import
@JvmOverloads() final BearerDid import(PortableDid portableDid, KeyManager keyManager)
Instantiates a BearerDid object for the DID WEB method from a given PortableDid.
This method allows for the creation of a
BearerDidobject using a previously created DID's key material, DID document, and metadata.- Parameters:
portableDid-The PortableDid object to import.
keyManager-Optionally specify an external Key Management System (KMS) used to generate keys and sign data. If not given, a new InMemoryKeyManager instance will be created and used.
-
import
@JvmOverloads() final BearerDid import(PortableDid portableDid)
Instantiates a BearerDid object for the DID WEB method from a given PortableDid.
This method allows for the creation of a
BearerDidobject using a previously created DID's key material, DID document, and metadata.- Parameters:
portableDid-The PortableDid object to import.
-
-
-
-