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

stacklok / toolhive / 21149312641
59%

Build:
DEFAULT BRANCH: main
Ran 19 Jan 2026 07:35PM UTC
Jobs 1
Files 448
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

19 Jan 2026 07:29PM UTC coverage: 59.227% (+0.09%) from 59.14%
21149312641

push

github

web-flow
Add UserInfo fetching support to authserver's upstream OAuth2 provider (#3344)

Add UserInfo fetching support to OAuth2 provider

Implement FetchUserInfo and ResolveIdentity methods on BaseOAuth2Provider
to retrieve user information from upstream OAuth2/OIDC providers. This
enables downstream handlers to obtain the authenticated user's subject.

FetchUserInfo makes an HTTP request to the configured UserInfo endpoint
with the access token as a Bearer credential. ResolveIdentity provides a
higher-level abstraction that fetches UserInfo and returns the subject
claim directly.

To support non-standard providers like GitHub that use "id" instead of
the OIDC-standard "sub" field, UserInfoFieldMapping allows configuring a
custom SubjectField. The ResolveSubject helper handles both string and
numeric subject values, converting JSON numbers to strings as needed.

The implementation includes response size limiting (1MB max), HTTP method
validation (GET/POST only per OIDC Core Section 5.3.1), and UserInfo
config validation during provider creation. The separate UserInfoFetcher
interface has been removed in favor of methods directly on OAuth2Provider.

Example usage for GitHub:
```
  UserInfo: &upstream.UserInfoConfig{
      EndpointURL: "https://api.github.com/user",
      FieldMapping: &upstream.UserInfoFieldMapping{
          SubjectField: "id",
      },
  }
```

96 of 108 new or added lines in 2 files covered. (88.89%)

13 existing lines in 4 files now uncovered.

35547 of 60018 relevant lines covered (59.23%)

81.12 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
12
91.38
-2.0% pkg/authserver/upstream/oauth2.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
80.81
-0.54% pkg/transport/proxy/httpsse/http_proxy.go
2
57.89
-3.51% pkg/transport/session/sse_session.go
3
71.85
-1.11% pkg/ignore/processor.go
6
75.47
-5.66% pkg/secrets/keyring/keyctl_linux.go
Jobs
ID Job ID Ran Files Coverage
1 21149312641.1 19 Jan 2026 07:35PM UTC 448
59.23
GitHub Action Run
Source Files on build 21149312641
  • Tree
  • List 448
  • Changed 9
  • Source Changed 2
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21149312641
  • 90eaa573 on github
  • Prev Build on main (#21141017726)
  • Next Build on main (#21150490639)
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