Skip to content

Commit

Permalink
feat: add GetID member functions to RecoveryAddress and Credentials (o…
Browse files Browse the repository at this point in the history
  • Loading branch information
alnr authored Sep 1, 2023
1 parent a28b523 commit 085d500
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions identity/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ func (c Credentials) TableName(context.Context) string {
return "identity_credentials"
}

func (c Credentials) GetID() uuid.UUID {
return c.ID
}

type (
// swagger:ignore
CredentialIdentifier struct {
Expand Down
4 changes: 4 additions & 0 deletions identity/identity_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ func (a RecoveryAddress) ValidateNID() error {
return nil
}

func (a RecoveryAddress) GetID() uuid.UUID {
return a.ID
}

// Hash returns a unique string representation for the recovery address.
func (a RecoveryAddress) Hash() string {
return fmt.Sprintf("%v|%v|%v|%v", a.Value, a.Via, a.IdentityID, a.NID)
Expand Down

0 comments on commit 085d500

Please sign in to comment.