Skip to content

Commit dabce8d

Browse files
weltekialexellis
authored andcommitted
Only print key ids on debug
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
1 parent fea2e57 commit dabce8d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

auth/jwt_authenticator.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ func (a jwtAuth) ServeHTTP(w http.ResponseWriter, r *http.Request) {
4040
issuer := a.issuer
4141

4242
st := time.Now()
43-
for _, key := range a.keySet.Keys {
44-
log.Printf("%s: %v", issuer, key.KeyID)
43+
44+
if a.opts.Debug {
45+
for _, key := range a.keySet.Keys {
46+
log.Printf("%s: %v", issuer, key.KeyID)
47+
}
4548
}
4649

4750
var bearer string

0 commit comments

Comments
 (0)