Skip to content

Commit

Permalink
fix: identity.CopyWithoutCredentials
Browse files Browse the repository at this point in the history
  • Loading branch information
alnr committed Feb 7, 2023
1 parent 290d28a commit 989c99d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion identity/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,10 @@ func (i *Identity) ParseCredentials(t CredentialsType, config interface{}) (*Cre
}

func (i *Identity) CopyWithoutCredentials() *Identity {
var ii = *i
i.lock().RLock()
defer i.lock().RUnlock()
ii := *i
ii.l = new(sync.RWMutex)
ii.Credentials = nil
return &ii
}
Expand Down

0 comments on commit 989c99d

Please sign in to comment.