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

stacklok / toolhive / 21149312641 / 1
59%
main: 59%

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

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",
      },
  }
```

35547 of 60018 relevant lines covered (59.23%)

81.12 hits per line

Source Files on job 21149312641.1
  • Tree
  • List 448
  • Changed 9
  • Source Changed 2
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 21149312641
  • 90eaa573 on github
  • Prev Job for on main (#21141017726.1)
  • Next Job for on main (#21150490639.1)
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