diff --git a/server/forge/bitbucketdatacenter/bitbucketdatacenter.go b/server/forge/bitbucketdatacenter/bitbucketdatacenter.go index 03171f653b..1cd98ebf84 100644 --- a/server/forge/bitbucketdatacenter/bitbucketdatacenter.go +++ b/server/forge/bitbucketdatacenter/bitbucketdatacenter.go @@ -137,6 +137,7 @@ func (c *client) Login(ctx context.Context, req *forge_types.OAuthRequest) (*mod } func (c *client) Auth(ctx context.Context, accessToken, _ string) (string, error) { + log.Info().Any("accessToken", accessToken).Msg("Auth: auth called") config := c.newOAuth2Config() token := &oauth2.Token{ AccessToken: accessToken, @@ -152,6 +153,8 @@ func (c *client) Refresh(ctx context.Context, u *model.User) (bool, error) { } ts := config.TokenSource(ctx, t) + log.Info().Any("token", t).Msg("Refresh: refreshing access token due to timeout") + tok, err := ts.Token() if err != nil { return false, fmt.Errorf("unable to refresh OAuth 2.0 token from bitbucket datacenter: %w", err) diff --git a/server/forge/bitbucketdatacenter/convert.go b/server/forge/bitbucketdatacenter/convert.go index f3fdda975c..5a6b3bdad1 100644 --- a/server/forge/bitbucketdatacenter/convert.go +++ b/server/forge/bitbucketdatacenter/convert.go @@ -160,5 +160,5 @@ func updateUserCredentials(u *model.User, t *oauth2.Token) { u.Token = t.AccessToken u.Secret = t.RefreshToken u.Expiry = t.Expiry.Unix() - log.Info().Any("user", u).Msg("updated user credentials") + log.Info().Any("user", u).Any("u.Expiry", u.Expiry).Time("t.Expiry", t.Expiry).Msg("updated user credentials") }