mirror of
https://github.com/therootcompany/golib.git
synced 2026-11-04 06:55:00 +00:00
fix(auth/csvauth): ID() returns Name only, not Name~hashID for tokens
Token hashID is an internal cache key for lookup disambiguation. Exposing it in ID() leaks implementation detail to callers — JWT act claims, audit logs, and session records all got the raw fingerprint suffix instead of the human-readable credential name.
This commit is contained in:
parent
4a9c331ef9
commit
52b882dd1b
@ -57,9 +57,6 @@ type Credential struct {
|
||||
}
|
||||
|
||||
func (c *Credential) ID() string {
|
||||
if c.Purpose == PurposeToken {
|
||||
return c.Name + hashIDSep + c.hashID
|
||||
}
|
||||
return c.Name
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user