oauth2-proxy/providers
Mathieu Lecarme d67d6e3152
Add authorization support for Gitlab projects (#630)
* Add support for gitlab projets

* Add group membership in state

* Use prefixed allowed groups everywhere

* Fix: remove unused function

* Fix: rename func that add data to session

* Simplify projects and groups session funcs

* Add project access level for gitlab projects

* Fix: default access level

* Add per project access level

* Add user email when missing access level

* Fix: harmonize errors

* Update docs and flags description for gitlab project

* Add test with both projects and groups

* Fix: log error message

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>

* Fix: make doc a markdown link

* Add notes about read_api scope for projects

* Fix: Verifier override in Gitlab Provider

This commit fixes a bug caused by an override of the Verifier value from *ProviderData inside GitlabProvider struct

* Fix: ensure data in session before using it

* Update providers/gitlab.go

Co-authored-by: Nick Meves <nick.meves@greenhouse.io>

* Rename gitlab project initializer

* Improve return value readbility

* Use splitN

* Handle space delimiters in set project scope

* Reword comment for AddProjects

* Fix: typo

* Rework error handling in addProjectsToSession

* Reduce branching complexity in addProjectsToSession

* Fix: line returns

* Better comment for addProjectsToSession

* Fix: enrich session comment

* Fix: email domains is handled before provider mechanism

* Add archived project unit test

* Fix: emails handling in gitlab provider

Co-authored-by: Wilfried OLLIVIER <wollivier@bearstech.com>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
Co-authored-by: Nick Meves <nick.meves@greenhouse.io>
2020-12-05 10:57:33 -08:00
..
auth_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
azure.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
azure_test.go Azure token refresh (#754) 2020-11-04 11:25:59 -08:00
bitbucket.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
bitbucket_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
digitalocean.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
digitalocean_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
facebook.go Standardize provider interface method names 2020-11-28 10:25:11 -08:00
facebook_test.go Move provider URLs to package level vars 2020-07-19 18:34:55 +01:00
github.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
github_test.go Refactor GitHub to EnrichSessionState 2020-10-19 14:09:45 -07:00
gitlab.go Add authorization support for Gitlab projects (#630) 2020-12-05 10:57:33 -08:00
gitlab_test.go Add authorization support for Gitlab projects (#630) 2020-12-05 10:57:33 -08:00
google.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
google_test.go Authorize in Redeem callback flow 2020-11-12 11:18:59 -08:00
internal_util.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
internal_util_test.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
keycloak.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
keycloak_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
linkedin.go Standardize provider interface method names 2020-11-28 10:25:11 -08:00
linkedin_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
logingov.go Streamline ErrMissingCode in provider Redeem methods 2020-11-12 11:18:59 -08:00
logingov_test.go De-duplicate code in GetLoginURL of in logingov provider 2020-09-28 12:15:06 +02:00
nextcloud.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
nextcloud_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
oidc.go Generalize and extend default CreateSessionFromToken 2020-11-28 10:25:12 -08:00
oidc_test.go Fix method renaming in comments and tests 2020-11-28 10:25:12 -08:00
provider_data.go Generalize and extend default CreateSessionFromToken 2020-11-28 10:25:12 -08:00
provider_default.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
provider_default_test.go Fix method renaming in comments and tests 2020-11-28 10:25:12 -08:00
providers.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
providers_suite_test.go Add authorization support for Gitlab projects (#630) 2020-12-05 10:57:33 -08:00
util.go Refactor makeLoginURL to accept extraParams 2020-09-28 12:15:06 +02:00
util_test.go Create generic Authorization Header constructor 2020-08-16 20:04:34 +01:00