Skip to content

feat: add refreshing access token functionality to get-access-token command #847

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

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

Benjosh95
Copy link
Contributor

@Benjosh95 Benjosh95 commented Jul 9, 2025

Description

The stackit auth get-access-token function didnt refresh token after expiration automatically but instead displayed an error. PR does exactly this by using a new function "RefreshAccessToken".

Jira: https://jira.schwarz/browse/STACKITCLI-201

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@Benjosh95 Benjosh95 requested a review from a team as a code owner July 9, 2025 07:52
@Benjosh95 Benjosh95 force-pushed the feat/cli-201-refresh-access-token branch from 71214f7 to e402723 Compare July 9, 2025 12:24
Copy link

github-actions bot commented Jul 9, 2025

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/auth/get-access-token 0.00% (ø)
github.com/stackitcloud/stackit-cli/internal/pkg/auth 56.88% (-2.70%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/auth/get-access-token/get_access_token.go 0.00% (ø) 12 (-5) 0 12 (-5)
github.com/stackitcloud/stackit-cli/internal/pkg/auth/auth.go 55.32% (-24.68%) 94 (+29) 52 42 (+29) 💀 💀

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@Benjosh95 Benjosh95 merged commit 3d6a354 into main Jul 9, 2025
5 checks passed
@Benjosh95 Benjosh95 deleted the feat/cli-201-refresh-access-token branch July 9, 2025 12:40
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