• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codozor / authk / 19938297188
54%

Build:
DEFAULT BRANCH: main
Ran 04 Dec 2025 05:40PM UTC
Jobs 1
Files 8
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Dec 2025 05:39PM UTC coverage: 53.425% (+1.7%) from 51.731%
19938297188

push

github

web-flow
✨ feat(oidc): Refactor OIDC client with golang.org/x/oauth2 and go-oidc (#6)

* ✨ feat(oidc): Refactor OIDC client with golang.org/x/oauth2 and go-oidc

This commit refactors the `internal/oidc` package to leverage the
`golang.org/x/oauth2` and `github.com/coreos/go-oidc` libraries.

The manual implementation of OAuth2/OIDC flows, including discovery,
token requests, and JSON parsing, has been replaced by robust,
industry-standard libraries.

Key changes include:
- Replaced manual OIDC discovery with `oidc.NewProvider`.
- Updated token retrieval (password and client credentials grants)
  to use `oauth2.Config` and `clientcredentials.Config`.
- Refactored token refreshing to use `oauth2.TokenSource` mechanisms.
- Eliminated custom `TokenResponse` struct in favor of `oauth2.Token`.
- Enhanced test suite (`internal/oidc/client_test.go`) to reflect new
  implementation and ensure compatibility with `go-oidc` expectations.
- Updated `cmd/authk/root.go` to use `token.Expiry` for refresh
  timing, removing custom `ExpiresIn` logic.

This refactoring significantly improves security (due to strict
validation of OIDC specs by go-oidc), maintainability, and reduces
the amount of custom code.

* ✅ feat: Improve test coverage and fix linting issue

This commit addresses the recent drop in test coverage reported by Coveralls and fixes a linting issue.

Changes include:
- **internal/oidc/client_test.go:**
  - Added error checking for `w.Write` call in mock server to resolve an `errcheck` linting error.
  - Introduced `TestClient_GetToken_Password` to specifically test the Resource Owner Password Credentials flow, increasing coverage for `GetToken` function.
- **internal/env/env_test.go:**
  - Added `TestFind_NotFound` to verify error handling when a file is not found.
  - Added `TestFind_WithSeparator` to test `Find` function behavior with paths containing separators.

These changes collectively improve the overall test coverage and code quality.

* 🐛 feat(oidc): Su... (continued)

49 of 74 new or added lines in 2 files covered. (66.22%)

2 existing lines in 2 files now uncovered.

273 of 511 relevant lines covered (53.42%)

1.74 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
9
5.0
-0.21% cmd/authk/root.go
16
79.35
6.01% internal/oidc/client.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
5.0
-0.21% cmd/authk/root.go
1
79.35
6.01% internal/oidc/client.go
Jobs
ID Job ID Ran Files Coverage
1 19938297188.1 04 Dec 2025 05:40PM UTC 8
53.42
GitHub Action Run
Source Files on build 19938297188
  • Tree
  • List 8
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0734aea4 on github
  • Prev Build on main (#19834344256)
  • Next Build on main (#19939419801)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc