Skip to content

Commit

Permalink
feat: add more detailed log messages to authentication.go (#1985)
Browse files Browse the repository at this point in the history
  • Loading branch information
burntcarrot authored Jul 27, 2021
1 parent ac9b762 commit 33c735e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/internal/filter/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (mw *AuthenticationMiddleware) Handle(ctx droplet.Context) error {

if err != nil || token == nil || !token.Valid {
log.Warnf("token validate failed: %s", err)
log.Warn("please check the secret in conf.yaml")
ctx.SetOutput(&data.SpecCodeResponse{StatusCode: http.StatusUnauthorized, Response: response})
return nil
}
Expand Down

0 comments on commit 33c735e

Please sign in to comment.