Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove duplicate tok.Token() #915

Merged
merged 4 commits into from
Jan 22, 2025
Merged

refactor: remove duplicate tok.Token() #915

merged 4 commits into from
Jan 22, 2025

Conversation

jackwotherspoon
Copy link
Collaborator

@jackwotherspoon jackwotherspoon commented Jan 16, 2025

In #909 we removed the need for refreshToken() but instead of removing the code we switched it to tok.Token()
which is already called so we can remove the duplicate.

if tp != nil {
var tokErr error
tok, tokErr = tp.Token(ctx)
if tokErr != nil {
return tls.Certificate{}, errtype.NewRefreshError(
"failed to retrieve Oauth2 token",
inst.String(),
tokErr,
)
}
tok, tokErr = tp.Token(ctx)
if tokErr != nil {
return tls.Certificate{}, errtype.NewRefreshError(
"failed to get Oauth2 token",
inst.String(),
tokErr,
)
}

@jackwotherspoon jackwotherspoon self-assigned this Jan 16, 2025
@jackwotherspoon jackwotherspoon requested a review from a team as a code owner January 16, 2025 21:34
@jackwotherspoon jackwotherspoon merged commit 42d0019 into main Jan 22, 2025
14 checks passed
@jackwotherspoon jackwotherspoon deleted the unused-tok branch January 22, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants