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

stacklok / toolhive / 21410526608
60%

Build:
DEFAULT BRANCH: main
Ran 27 Jan 2026 07:18PM UTC
Jobs 1
Files 477
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

27 Jan 2026 07:11PM UTC coverage: 60.178% (-0.04%) from 60.215%
21410526608

push

github

web-flow
Add configurable UserInfo field mapping and UserInfo support for authserver's OAuth provider (#3466)

Add configurable UserInfo field mapping and UserInfo support for OAuth2 provider

Enhance UserInfoFieldMapping to support ordered fallback field chains,
enabling compatibility with non-standard OAuth providers like GitHub that
use different claim names (e.g., "id" instead of "sub").

Changes:
- Replace single field names with ordered lists (SubjectFields, NameFields, EmailFields)
- Add ResolveField() helper with support for numeric ID conversion
- Add ResolveSubject/ResolveName/ResolveEmail methods with defaults
- Implement UserInfoProvider interface on BaseOAuth2Provider
- Support additional headers for provider-specific requirements (e.g., GitHub API versioning)
- Add JSON/YAML struct tags for file-based configuration support

Example YAML configuration for GitHub:
```
upstream:
  client_id: "my-app"
  client_secret: "secret"
  redirect_uri: "http://localhost:8080/callback"
  authorization_endpoint: "https://github.com/login/oauth/authorize"
  token_endpoint: "https://github.com/login/oauth/access_token"
  scopes:
    - user:email
  userinfo:
    endpoint_url: "https://api.github.com/user"
    additional_headers:
      X-GitHub-Api-Version: "2022-11-28"
    field_mapping:
      subject_fields: ["id", "login"]
      name_fields: ["name", "login"]
      email_fields: ["email"]
```

43 of 43 new or added lines in 2 files covered. (100.0%)

36 existing lines in 4 files now uncovered.

38421 of 63846 relevant lines covered (60.18%)

78.05 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
3
71.85
-1.11% pkg/ignore/processor.go
8
25.0
-4.44% pkg/client/manager.go
11
65.0
-13.75% pkg/client/discovery.go
14
66.48
-7.69% pkg/client/config.go
Jobs
ID Job ID Ran Files Coverage
1 21410526608.1 27 Jan 2026 07:18PM UTC 477
60.18
GitHub Action Run
Source Files on build 21410526608
  • Tree
  • List 477
  • Changed 7
  • Source Changed 2
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21410526608
  • 2df1a150 on github
  • Prev Build on main (#21409738390)
  • Next Build on main (#21428413335)
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