mirror of
https://github.com/minio/minio.git
synced 2025-11-25 20:16:10 -05:00
Audit log claims from token (#6847)
This commit is contained in:
committed by
Nitish Tiwari
parent
d4265f9a13
commit
9e3fce441e
@@ -55,7 +55,7 @@ func AddAuditTarget(t Target) {
|
||||
}
|
||||
|
||||
// AuditLog - logs audit logs to all audit targets.
|
||||
func AuditLog(w http.ResponseWriter, r *http.Request, api string) {
|
||||
func AuditLog(w http.ResponseWriter, r *http.Request, api string, reqClaims map[string]interface{}) {
|
||||
var statusCode int
|
||||
lrw, ok := w.(*ResponseWriter)
|
||||
if ok {
|
||||
@@ -63,6 +63,6 @@ func AuditLog(w http.ResponseWriter, r *http.Request, api string) {
|
||||
}
|
||||
// Send audit logs only to http targets.
|
||||
for _, t := range AuditTargets {
|
||||
t.Send(audit.ToEntry(w, r, api, statusCode))
|
||||
_ = t.Send(audit.ToEntry(w, r, api, statusCode, reqClaims))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user