Skip to content

Commit

Permalink
Merge pull request #34 from axone-protocol/fix/gov-proof-purpose
Browse files Browse the repository at this point in the history
fix(credential): change governance proof purpose as assertionMethod
  • Loading branch information
bdeneux authored Sep 19, 2024
2 parents 5a4ba90 + 6f6fc30 commit 8fcad23
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
3 changes: 1 addition & 2 deletions credential/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import (
)

const (
ClaimToService = "toService"
ProofPurposeAuthentication = "authentication"
ClaimToService = "toService"
)

const ErrAuthClaim MessageError = "invalid auth claim"
Expand Down
5 changes: 5 additions & 0 deletions credential/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import (
"github.com/hyperledger/aries-framework-go/pkg/doc/verifiable"
)

const (
ProofPurposeAssertionMethod = "assertionMethod"
ProofPurposeAuthentication = "authentication"
)

// Generator is a verifiable credential generator.
type Generator struct {
vc Descriptor
Expand Down
2 changes: 1 addition & 1 deletion credential/template/dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (d *DatasetDescriptor) IssuedAt() *time.Time {
}

func (d *DatasetDescriptor) ProofPurpose() string {
return "assertionMethod"
return credential.ProofPurposeAssertionMethod
}

func (d *DatasetDescriptor) Generate() (*bytes.Buffer, error) {
Expand Down
2 changes: 1 addition & 1 deletion credential/template/governance.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (g *GovernanceDescriptor) IssuedAt() *time.Time {
}

func (g *GovernanceDescriptor) ProofPurpose() string {
return "authentication"
return credential.ProofPurposeAssertionMethod
}

func (g *GovernanceDescriptor) Generate() (*bytes.Buffer, error) {
Expand Down
2 changes: 1 addition & 1 deletion credential/template/publication.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (d *PublicationDescriptor) IssuedAt() *time.Time {
}

func (d *PublicationDescriptor) ProofPurpose() string {
return "assertionMethod"
return credential.ProofPurposeAssertionMethod
}

func (d *PublicationDescriptor) Generate() (*bytes.Buffer, error) {
Expand Down

0 comments on commit 8fcad23

Please sign in to comment.