Skip to content

Commit

Permalink
fixes after merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
reinkrul committed Nov 12, 2023
1 parent 51537f8 commit bcae7aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 0 additions & 4 deletions storage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ func DefaultConfig() Config {
}
}

type SQLConfig struct {
ConnectionString string `koanf:"connection"`
}

// SQLConfig specifies config for the SQL storage engine.
type SQLConfig struct {
// ConnectionString is the connection string for the SQL database.
Expand Down
10 changes: 5 additions & 5 deletions usecase/maintainer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func Test_maintainer_delete(t *testing.T) {

func setupMaintainer(t *testing.T, storageInstance storage.Engine) *maintainer {
t.Cleanup(func() {
underlyingDB, err := storageInstance.SQLDatabase().DB()
underlyingDB, err := storageInstance.GetSQLDatabase().DB()
require.NoError(t, err)
_, err = underlyingDB.Exec("DELETE FROM usecaselist_presentations")
require.NoError(t, err)
Expand All @@ -292,7 +292,7 @@ func setupMaintainer(t *testing.T, storageInstance storage.Engine) *maintainer {
for k, v := range testDefinitions {
testDefinitionsCopy[k] = v
}
m, err := newMaintainer(storageInstance.SQLDatabase(), testDefinitionsCopy)
m, err := newMaintainer(storageInstance.GetSQLDatabase(), testDefinitionsCopy)
require.NoError(t, err)
return m
}
Expand All @@ -304,7 +304,7 @@ func createCredential(issuerDID did.DID, subjectDID did.DID) vc.VerifiableCreden
}

func createCredentialWithClaims(issuerDID did.DID, subjectDID did.DID, claimVisitor func(map[string]interface{})) vc.VerifiableCredential {
vcID := issuerDID
vcID := did.DIDURL{DID: issuerDID}
vcID.Fragment = uuid.NewString()
vcIDURI := vcID.URI()
expirationDate := time.Now().Add(time.Hour * 24)
Expand Down Expand Up @@ -341,7 +341,7 @@ func createPresentationWithClaims(subjectDID did.DID, claimVisitor func(map[stri
claims := map[string]interface{}{
jwt.IssuerKey: subjectDID.String(),
jwt.SubjectKey: subjectDID.String(),
jwt.JwtIDKey: subjectDID.WithoutURL().String() + "#" + uuid.NewString(),
jwt.JwtIDKey: subjectDID.String() + "#" + uuid.NewString(),
"vp": vc.VerifiablePresentation{
Type: append([]ssi.URI{ssi.MustParseURI("VerifiablePresentation")}),
VerifiableCredential: credentials,
Expand Down Expand Up @@ -371,7 +371,7 @@ func signJWT(subjectDID did.DID, claims map[string]interface{}, headers map[stri
if err != nil {
return "", nil
}
keyID := subjectDID
keyID := did.DIDURL{DID: subjectDID}
keyID.Fragment = "0"
if err := subjectKeyJWK.Set(jwk.AlgorithmKey, jwa.ES256); err != nil {
return "", err
Expand Down
2 changes: 1 addition & 1 deletion vcr/credential/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func PresentationSigner(presentation vc.VerifiablePresentation) (*did.DID, error
}
}

func PresentationSigningKeyID(presentation vc.VerifiablePresentation) (*did.DID, error) {
func PresentationSigningKeyID(presentation vc.VerifiablePresentation) (*did.DIDURL, error) {
switch presentation.Format() {
case vc.JWTPresentationProofFormat:
token := presentation.JWT()
Expand Down

0 comments on commit bcae7aa

Please sign in to comment.