oauth2_proxy/providers
Justin Palpant 7d910c0ae8 Check Google group membership with hasMember and get. (#224)
* Check Google group membership with hasMember and get.

This PR is an enhancement built on
https://github.com/pusher/oauth2_proxy/pull/160. That PR reduces the
number of calls to the Google Admin API and simplifies the code by
using the hasMember method. It also supports checking membership in
nested groups.

However, the above message doesn't handle members who are not a part
of the domain. The hasMember API returns a 400 for that case. As a
fallback, when the API returns a 400, this change will try using the
`get` API which works as expected for members who aren't a part of the
domain. Supporting members who belong to the Google group but aren't
part of the domain is a requested feature from
https://github.com/pusher/oauth2_proxy/issues/95.

https://developers.google.com/admin-sdk/directory/v1/reference/members/get

Note that nested members who are not a part of the domain will not be
correctly detected with this change.

* Update CHANGELOG.

* Fix incorrect JSON and stop escaping strings.

* Add comments for each scenario.
2019-08-06 10:38:24 +01:00
..
azure_test.go Move SessionState to its own package 2019-05-18 13:09:56 +02:00
azure.go Fix gofmt for changed files 2019-06-15 11:34:00 +02:00
facebook.go Move api to pkg/requests 2019-06-08 07:40:43 +01:00
github_test.go Move SessionState to its own package 2019-05-18 13:09:56 +02:00
github.go Fix gofmt for changed files 2019-06-15 11:34:00 +02:00
gitlab_test.go Move SessionState to its own package 2019-05-18 13:09:56 +02:00
gitlab.go Fix gofmt for changed files 2019-06-15 11:34:00 +02:00
google_test.go Check Google group membership with hasMember and get. (#224) 2019-08-06 10:38:24 +01:00
google.go Check Google group membership with hasMember and get. (#224) 2019-08-06 10:38:24 +01:00
internal_util_test.go Move SessionState to its own package 2019-05-18 13:09:56 +02:00
internal_util.go Merge branch 'master' into refactor 2019-07-15 11:30:43 +01:00
linkedin_test.go Move SessionState to its own package 2019-05-18 13:09:56 +02:00
linkedin.go Move api to pkg/requests 2019-06-08 07:40:43 +01:00
logingov_test.go add login.gov provider (#55) 2019-03-20 13:44:51 +00:00
logingov.go Add CreatedAt to SessionState 2019-05-20 11:26:09 +02:00
oidc.go Create option to skip verified email check in OIDC provider 2019-07-11 15:29:48 +01:00
provider_data.go Add comments to exported methods for providers package 2018-12-20 10:37:59 +00:00
provider_default_test.go Move SessionState to its own package 2019-05-18 13:09:56 +02:00
provider_default.go Move cookie to pkg/encryption 2019-06-15 11:33:57 +02:00
providers.go Move cookie to pkg/encryption 2019-06-15 11:33:57 +02:00