mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-09-29 19:21:13 +02:00
feat: migrate google used organization id and header normalization booleans to pointers
Signed-off-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
+2
-2
@@ -109,11 +109,11 @@ func NewGoogleProvider(p *ProviderData, opts options.GoogleOptions) (*GoogleProv
|
||||
},
|
||||
}
|
||||
|
||||
if opts.UseOrganizationID || opts.ServiceAccountJSON != "" || ptr.Deref(opts.UseApplicationDefaultCredentials, options.DefaultUseApplicationDefaultCredentials) {
|
||||
if ptr.Deref(opts.UseOrganizationID, options.DefaultGoogleUseOrganizationID) || opts.ServiceAccountJSON != "" || ptr.Deref(opts.UseApplicationDefaultCredentials, options.DefaultUseApplicationDefaultCredentials) {
|
||||
// reuse admin service to avoid multiple calls for token
|
||||
var adminService *admin.Service
|
||||
|
||||
if opts.UseOrganizationID {
|
||||
if ptr.Deref(opts.UseOrganizationID, options.DefaultGoogleUseOrganizationID) {
|
||||
// add user scopes to admin api
|
||||
userScope := getAdminAPIUserScope(opts.AdminAPIUserScope)
|
||||
for index, scope := range possibleScopesList {
|
||||
|
||||
Reference in New Issue
Block a user