1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2024-11-28 09:08:44 +02:00
oauth2-proxy/providers
Weinong Wang f3209a40e1
extract email from id_token for azure provider (#914)
* extract email from id_token for azure provider

this change fixes a bug when --resource is specified with non-Graph
api and the access token destined to --resource is used to call Graph
api

* fixed typo

* refactor GetEmailAddress to EnrichSessionState

* make getting email from idtoken best effort and fall back to previous behavior when it's absent

* refactor to use jwt package to extract claims

* fix lint

* refactor unit tests to use test table
refactor the get email logic from profile api

* addressing feedback

* added oidc verifier to azure provider and extract email from id_token if present

* fix lint and codeclimate

* refactor to use oidc verifier to verify id_token if oidc is configured

* fixed UT

* addressed comments

* minor refactor

* addressed feedback

* extract email from id_token first and fallback to access token

* fallback to access token as well when id_token doesn't have email claim

* address feedbacks

* updated change log!
2021-03-09 20:53:15 -08:00
..
auth_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
azure_test.go extract email from id_token for azure provider (#914) 2021-03-09 20:53:15 -08:00
azure.go extract email from id_token for azure provider (#914) 2021-03-09 20:53:15 -08:00
bitbucket_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
bitbucket.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
digitalocean_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
facebook_test.go Move provider URLs to package level vars 2020-07-19 18:34:55 +01:00
facebook.go Standardize provider interface method names 2020-11-28 10:25:11 -08:00
github_test.go Refactor GitHub to EnrichSessionState 2020-10-19 14:09:45 -07:00
github.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
gitlab_test.go Add authorization support for Gitlab projects (#630) 2020-12-05 10:57:33 -08:00
gitlab.go Use logger for sensitive data logging to be able to disable it (#1002) 2021-01-20 19:56:13 +00:00
google_test.go Authorize in Redeem callback flow 2020-11-12 11:18:59 -08:00
google.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
internal_util_test.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
internal_util.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
keycloak_test.go Use a generic http.HandlerFunc in Keycloak tests 2020-12-24 14:04:19 -08:00
keycloak.go Handle ValidateURL fallback for nil & empty struct cases 2020-12-24 14:04:20 -08:00
linkedin_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
logingov_test.go De-duplicate code in GetLoginURL of in logingov provider 2020-09-28 12:15:06 +02:00
logingov.go Update golangci-lint version in CI workflow 2021-02-17 20:25:37 +00:00
nextcloud_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
nextcloud.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
oidc_test.go Support non-list and complex groups 2020-12-21 16:52:18 -08:00
oidc.go Use global OIDC fields for Gitlab 2020-12-21 16:54:12 -08:00
provider_data_test.go Improve OIDC error handling 2020-12-21 16:53:05 -08:00
provider_data.go Use global OIDC fields for Gitlab 2020-12-21 16:54:12 -08:00
provider_default_test.go Fix method renaming in comments and tests 2020-11-28 10:25:12 -08:00
provider_default.go Update golangci-lint version in CI workflow 2021-02-17 20:25:37 +00:00
providers_suite_test.go Ensure errors in tests are logged to the GinkgoWriter 2021-02-10 19:50:04 +00:00
providers.go Update golangci-lint version in CI workflow 2021-02-17 20:25:37 +00:00
util_test.go Refactor OIDC to EnrichSession 2020-12-21 16:51:52 -08:00
util.go Use global OIDC fields for Gitlab 2020-12-21 16:54:12 -08:00