Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
wistefan committed Mar 6, 2025
1 parent 69405ef commit 7060a05
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gaiax/gaiaXClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,21 @@ func NewGaiaXHttpClient() (client GaiaXClient, err error) {

func (ghc GaiaXHttpClient) IsTrustedParticipant(registryEndpoint string, did string) (trusted bool) {

logging.Log().Debug("Verify participant at gaia-x registry.")

// 1. get jwk from did
didDocument, err := ghc.resolveIssuer(did)

if err != nil {
logging.Log().Warnf("Was not able to resolve the issuer. E: %v", err)
return false
}
logging.Log().Debug("Got did document.")

// 2. verify at the registry
for _, verficationMethod := range didDocument.DIDDocument.VerificationMethod {
if verficationMethod.ID == did {
logging.Log().Debug("Verify the issuer.")
return ghc.verifiyIssuer(registryEndpoint, verficationMethod)
}
}
Expand Down

0 comments on commit 7060a05

Please sign in to comment.