mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 10:07:21 +02:00
Never log tokens (#2466)
This commit is contained in:
parent
a40bb4f890
commit
29e93bdf8b
@ -107,7 +107,7 @@ func (interceptor *AuthInterceptor) refreshToken() error {
|
||||
}
|
||||
|
||||
interceptor.accessToken = accessToken
|
||||
log.Trace().Str("token", accessToken).Msg("Token refreshed")
|
||||
log.Trace().Msg("token refreshed")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -126,13 +126,14 @@ func CreatePipeline(ctx context.Context, store store.Store, f forge.Forge, cron
|
||||
// the pipeline.
|
||||
if refresher, ok := f.(forge.Refresher); ok {
|
||||
refreshed, err := refresher.Refresh(ctx, creator)
|
||||
log.Debug().Msgf("token refreshed: %t", refreshed)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msgf("failed to refresh oauth2 token for creator: %s", creator.Login)
|
||||
} else if refreshed {
|
||||
if err := store.UpdateUser(creator); err != nil {
|
||||
log.Error().Err(err).Msgf("error while updating creator: %s", creator.Login)
|
||||
// move forward
|
||||
} else {
|
||||
log.Debug().Msgf("token refreshed for creator: %s", creator.Login)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user