Skip to content

OAuth Provider - Add Org/Team membership to userinfo endpoint #16818

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

Closed
1 of 4 tasks
bminer opened this issue Aug 25, 2021 · 2 comments
Closed
1 of 4 tasks

OAuth Provider - Add Org/Team membership to userinfo endpoint #16818

bminer opened this issue Aug 25, 2021 · 2 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@bminer
Copy link
Contributor

bminer commented Aug 25, 2021

  • Gitea version (or commit ref): 1.15.0
  • Git version: N/A
  • Operating system: Linux
  • Database (use [x]): N/A
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite

Description

When Gitea is acting as an OAuth provider, it would be nice if the /login/oauth/userinfo endpoint would return the orgs/teams to which a user is assigned if the "profile" scope is set. This would allow the client to parse this information and could possibly map it to a user group.

One implementation might add a new claim for each org, using the org name as the key for the claim. The claim would be an array of team names to which the user belonged for that org.

Another implementation would be to add a "teams" claim containing an array of [org_name]:[team_name] strings (where the org name and team name are concatenated together, separated by a colon or dash).

Thoughts on this? I am willing to submit a PR.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Aug 28, 2021
@thetechnick
Copy link
Contributor

Hey there!
I just revamped my home lab and use Gitea as OIDC provider for Harbor, having a group claim like with dex really comes in handy.
Created a small PR to add groups support. PTAL :)

@lunny
Copy link
Member

lunny commented Nov 17, 2024

Resolved by #17367

@lunny lunny closed this as completed Nov 17, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Feb 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

3 participants