From b297de22f2cbc073ce7e7a571485c0e8eb7fa09c Mon Sep 17 00:00:00 2001 From: vmidyllic <74898029+vmidyllic@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:13:11 +0200 Subject: [PATCH 1/3] add services --- verifiable/constants.go | 6 ++++++ verifiable/did_doc.go | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/verifiable/constants.go b/verifiable/constants.go index b2c93af..e797e97 100644 --- a/verifiable/constants.go +++ b/verifiable/constants.go @@ -51,6 +51,12 @@ const ( // PushNotificationServiceType is service type for delivering push notifications to identity PushNotificationServiceType = "push-notification" + // Iden3MobileServiceType is service type for mobile function invoke to reach user agent in iden3 protocol + Iden3MobileServiceType = "Iden3MobileServiceV1" + + // Iden3WebServiceType is service type for web redirects as a way to reach user agent in iden3 protocol + Iden3WebServiceType = "Iden3WebRedirectV1" + // CredentialMerklizedRootPositionIndex is merklized root position of W3CCredential in the IndexDataSlotA (core claim) CredentialMerklizedRootPositionIndex = "index" diff --git a/verifiable/did_doc.go b/verifiable/did_doc.go index d134421..b443d2d 100644 --- a/verifiable/did_doc.go +++ b/verifiable/did_doc.go @@ -24,6 +24,14 @@ type Service struct { ServiceEndpoint string `json:"serviceEndpoint"` } +// WebRedirectService describes the service of web redirection +type WebRedirectService struct { + ID string `json:"id"` + Type string `json:"type"` + ServiceEndpoint string `json:"serviceEndpoint"` + Method string `json:"method"` +} + // PushService describes the services of push notifications type PushService struct { Service From 1d80d4edfd4946ecfc3d402cb73bd3d6126defaf Mon Sep 17 00:00:00 2001 From: vmidyllic <74898029+vmidyllic@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:16:26 +0200 Subject: [PATCH 2/3] add services --- verifiable/did_doc.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/verifiable/did_doc.go b/verifiable/did_doc.go index b443d2d..79cf18a 100644 --- a/verifiable/did_doc.go +++ b/verifiable/did_doc.go @@ -26,10 +26,8 @@ type Service struct { // WebRedirectService describes the service of web redirection type WebRedirectService struct { - ID string `json:"id"` - Type string `json:"type"` - ServiceEndpoint string `json:"serviceEndpoint"` - Method string `json:"method"` + Service + Method string `json:"method"` } // PushService describes the services of push notifications From 8a350a2c12568e0b38fa76eff6714a3c2f593818 Mon Sep 17 00:00:00 2001 From: vmidyllic <74898029+vmidyllic@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:18:40 +0200 Subject: [PATCH 3/3] fix --- verifiable/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/verifiable/constants.go b/verifiable/constants.go index e797e97..9ed489e 100644 --- a/verifiable/constants.go +++ b/verifiable/constants.go @@ -55,7 +55,7 @@ const ( Iden3MobileServiceType = "Iden3MobileServiceV1" // Iden3WebServiceType is service type for web redirects as a way to reach user agent in iden3 protocol - Iden3WebServiceType = "Iden3WebRedirectV1" + Iden3WebServiceType = "Iden3WebRedirectServiceV1" // CredentialMerklizedRootPositionIndex is merklized root position of W3CCredential in the IndexDataSlotA (core claim) CredentialMerklizedRootPositionIndex = "index"