From 2374bd5ec70d814f13594ce09bf61b9b5aeac3fa Mon Sep 17 00:00:00 2001 From: Wout Slakhorst Date: Mon, 18 Nov 2024 09:03:24 +0100 Subject: [PATCH] add index for auth creds (#3562) --- vcr/assets/assets/default.index.yaml | 8 +++++--- vcr/vcr_test.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/vcr/assets/assets/default.index.yaml b/vcr/assets/assets/default.index.yaml index eb2ac6c4a8..7454b11699 100644 --- a/vcr/assets/assets/default.index.yaml +++ b/vcr/assets/assets/default.index.yaml @@ -5,9 +5,6 @@ indices: - name: index_issuer parts: - iriPath: ["https://www.w3.org/2018/credentials#issuer"] - - name: index_subject - parts: - - iriPath: ["https://www.w3.org/2018/credentials#credentialSubject"] - name: index_organization parts: - iriPath: ["https://www.w3.org/2018/credentials#credentialSubject", "http://schema.org/organization", "http://schema.org/legalname"] @@ -20,3 +17,8 @@ indices: parts: - iriPath: ["https://www.w3.org/2018/credentials#credentialSubject"] - iriPath: ["https://www.w3.org/2018/credentials#credentialSubject", "https://nuts.nl/credentials/v1#subject"] + - name: index_auth_subject_purpose_resources + parts: + - iriPath: ["https://www.w3.org/2018/credentials#credentialSubject"] + - iriPath: ["https://www.w3.org/2018/credentials#credentialSubject", "https://nuts.nl/credentials/v1#purposeOfUse"] + - iriPath: ["https://www.w3.org/2018/credentials#credentialSubject", "https://nuts.nl/credentials/v1#resources", "https://nuts.nl/credentials/v1#path"] \ No newline at end of file diff --git a/vcr/vcr_test.go b/vcr/vcr_test.go index 195b99ccd6..d4833943a9 100644 --- a/vcr/vcr_test.go +++ b/vcr/vcr_test.go @@ -163,8 +163,8 @@ func TestVCR_Start(t *testing.T) { } assert.NotNil(t, mainBucket.Bucket([]byte("index_id"))) assert.NotNil(t, mainBucket.Bucket([]byte("index_issuer"))) - assert.NotNil(t, mainBucket.Bucket([]byte("index_subject"))) assert.NotNil(t, mainBucket.Bucket([]byte("index_organization"))) + assert.NotNil(t, mainBucket.Bucket([]byte("index_auth_subject_purpose_resources"))) return nil })