Skip to content

Commit

Permalink
Merge pull request #108 from AlanD20/unlock-items
Browse files Browse the repository at this point in the history
Prompt to unlock individual item when getting secret from keyring in unix system
  • Loading branch information
szuecs authored Jun 6, 2024
2 parents 28657a5 + 69620c4 commit de351c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions keyring_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ func (s secretServiceProvider) Get(service, user string) (string, error) {
}
defer svc.Close(session)

// unlock if invdividual item is locked
err = svc.Unlock(item)
if err != nil {
return "", err
}

secret, err := svc.GetSecret(item, session.Path())
if err != nil {
return "", err
Expand Down

0 comments on commit de351c5

Please sign in to comment.