You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/models
KN4CK3R e8186f1c0f
Map OIDC groups to Orgs/Teams (#21441)
Fixes #19555

Test-Instructions:
https://github.com/go-gitea/gitea/pull/21441#issuecomment-1419438000

This PR implements the mapping of user groups provided by OIDC providers
to orgs teams in Gitea. The main part is a refactoring of the existing
LDAP code to make it usable from different providers.

Refactorings:
- Moved the router auth code from module to service because of import
cycles
- Changed some model methods to take a `Context` parameter
- Moved the mapping code from LDAP to a common location

I've tested it with Keycloak but other providers should work too. The
JSON mapping format is the same as for LDAP.


![grafik](https://user-images.githubusercontent.com/1666336/195634392-3fc540fc-b229-4649-99ac-91ae8e19df2d.png)

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 year ago
..
actions Fix ref to trigger Actions (#22679) 1 year ago
activities Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
admin Implement FSFE REUSE for golang files (#21840) 2 years ago
asymkey Improve error report when user passes a private key (#22726) 1 year ago
auth Support scoped access tokens (#20908) 1 year ago
avatars Fix get system setting bug when enabled redis cache (#22295) 1 year ago
db Show all projects, not just repo projects and open/closed projects (#22640) 1 year ago
dbfs Add some comments for recent code (#22725) 1 year ago
fixtures Do not overwrite empty DefaultBranch (#22708) 1 year ago
git Add cron method to gc LFS MetaObjects (#22385) 1 year ago
issues Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
migrations Implement actions (#21937) 1 year ago
organization Map OIDC groups to Orgs/Teams (#21441) 1 year ago
packages Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
perm Rename almost all Ctx functions (#22071) 2 years ago
project Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
pull refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
secret Secrets storage with SecretKey encrypted (#22142) 1 year ago
system Set disable_gravatar/enable_federated_avatar when offline mode is true (#22479) 1 year ago
unit Repositories: by default disable all units except code and pulls on forks (#22541) 1 year ago
unittest Implement actions (#21937) 1 year ago
user Implement actions (#21937) 1 year ago
webhook Support system hook API (#14537) 1 year ago
error.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fixture_generation.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fixture_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
main_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
migrate.go Check primary keys for all tables and drop ForeignReference (#21721) 1 year ago
migrate_test.go Check primary keys for all tables and drop ForeignReference (#21721) 1 year ago
org.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
org_team.go Supports wildcard protected branch (#20825) 1 year ago
org_team_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
org_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Implement actions (#21937) 1 year ago
repo_collaboration.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo_collaboration_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_transfer.go Always reuse transaction (#22362) 1 year ago
repo_transfer_test.go Rename almost all Ctx functions (#22071) 2 years ago
user.go Supports wildcard protected branch (#20825) 1 year ago