From ba6e78b154c0cb9513b7a80ac3fcaa4bda598833 Mon Sep 17 00:00:00 2001 From: sonatard Date: Fri, 6 Nov 2020 15:21:44 +0900 Subject: [PATCH 1/7] Add enableAnonymousUser param to CreateTenant and UpdateTenant --- auth/auth.go | 6 +++--- auth/tenant_mgt.go | 12 ++++++++++++ auth/tenant_mgt_test.go | 28 ++++++++++++++++++++-------- go.sum | 1 - integration/auth/tenant_mgt_test.go | 8 ++++++-- 5 files changed, 41 insertions(+), 14 deletions(-) diff --git a/auth/auth.go b/auth/auth.go index 8ef77158..b6505a2b 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -144,10 +144,10 @@ func NewClient(ctx context.Context, conf *internal.AuthConfig) (*Client, error) baseURL = fmt.Sprintf("http://%s/identitytoolkit.googleapis.com", authEmulatorHost) } idToolkitV1Endpoint := fmt.Sprintf("%s/v1", baseURL) - idToolkitV2Beta1Endpoint := fmt.Sprintf("%s/v2beta1", baseURL) + idToolkitV2Endpoint := fmt.Sprintf("%s/v2", baseURL) userManagementEndpoint := idToolkitV1Endpoint - providerConfigEndpoint := idToolkitV2Beta1Endpoint - tenantMgtEndpoint := idToolkitV2Beta1Endpoint + providerConfigEndpoint := idToolkitV2Endpoint + tenantMgtEndpoint := idToolkitV2Endpoint base := &baseClient{ userManagementEndpoint: userManagementEndpoint, diff --git a/auth/tenant_mgt.go b/auth/tenant_mgt.go index 802926e9..98af99c1 100644 --- a/auth/tenant_mgt.go +++ b/auth/tenant_mgt.go @@ -47,6 +47,7 @@ type Tenant struct { DisplayName string `json:"displayName"` AllowPasswordSignUp bool `json:"allowPasswordSignup"` EnableEmailLinkSignIn bool `json:"enableEmailLinkSignin"` + EnableAnonymousUser bool `json:"enableAnonymousUser"` } // TenantClient is used for managing users, configuring SAML/OIDC providers, and generating email @@ -216,6 +217,7 @@ const ( tenantDisplayNameKey = "displayName" allowPasswordSignUpKey = "allowPasswordSignup" enableEmailLinkSignInKey = "enableEmailLinkSignin" + enableAnonymousUser = "enableAnonymousUser" ) // TenantToCreate represents the options used to create a new tenant. @@ -240,6 +242,11 @@ func (t *TenantToCreate) EnableEmailLinkSignIn(enable bool) *TenantToCreate { return t.set(enableEmailLinkSignInKey, enable) } +// EnableAnonymousUser enables or disables anonymous user. +func (t *TenantToCreate) EnableAnonymousUser(enable bool) *TenantToCreate { + return t.set(enableAnonymousUser, enable) +} + func (t *TenantToCreate) set(key string, value interface{}) *TenantToCreate { t.ensureParams().Set(key, value) return t @@ -275,6 +282,11 @@ func (t *TenantToUpdate) EnableEmailLinkSignIn(enable bool) *TenantToUpdate { return t.set(enableEmailLinkSignInKey, enable) } +// EnableAnonymousUser enables or disables anonymous user. +func (t *TenantToUpdate) EnableAnonymousUser(enable bool) *TenantToUpdate { + return t.set(enableAnonymousUser, enable) +} + func (t *TenantToUpdate) set(key string, value interface{}) *TenantToUpdate { if t.params == nil { t.params = make(nestedMap) diff --git a/auth/tenant_mgt_test.go b/auth/tenant_mgt_test.go index c6ce0909..7e4ae165 100644 --- a/auth/tenant_mgt_test.go +++ b/auth/tenant_mgt_test.go @@ -1084,14 +1084,16 @@ const tenantResponse = `{ "name":"projects/mock-project-id/tenants/tenantID", "displayName": "Test Tenant", "allowPasswordSignup": true, - "enableEmailLinkSignin": true + "enableEmailLinkSignin": true, + "enableAnonymousUser": true }` const tenantResponse2 = `{ "name":"projects/mock-project-id/tenants/tenantID2", "displayName": "Test Tenant 2", "allowPasswordSignup": true, - "enableEmailLinkSignin": true + "enableEmailLinkSignin": true, + "enableAnonymousUser": true }` const tenantNotFoundResponse = `{ @@ -1105,6 +1107,7 @@ var testTenant = &Tenant{ DisplayName: "Test Tenant", AllowPasswordSignUp: true, EnableEmailLinkSignIn: true, + EnableAnonymousUser: true, } var testTenant2 = &Tenant{ @@ -1112,6 +1115,7 @@ var testTenant2 = &Tenant{ DisplayName: "Test Tenant 2", AllowPasswordSignUp: true, EnableEmailLinkSignIn: true, + EnableAnonymousUser: true, } func TestTenant(t *testing.T) { @@ -1177,7 +1181,8 @@ func TestCreateTenant(t *testing.T) { options := (&TenantToCreate{}). DisplayName(testTenant.DisplayName). AllowPasswordSignUp(testTenant.AllowPasswordSignUp). - EnableEmailLinkSignIn(testTenant.EnableEmailLinkSignIn) + EnableEmailLinkSignIn(testTenant.EnableEmailLinkSignIn). + EnableAnonymousUser(testTenant.EnableAnonymousUser) tenant, err := client.TenantManager.CreateTenant(context.Background(), options) if err != nil { t.Fatal(err) @@ -1191,6 +1196,7 @@ func TestCreateTenant(t *testing.T) { "displayName": testTenant.DisplayName, "allowPasswordSignup": testTenant.AllowPasswordSignUp, "enableEmailLinkSignin": testTenant.EnableEmailLinkSignIn, + "enableAnonymousUser": testTenant.EnableAnonymousUser, } if err := checkCreateTenantRequest(s, wantBody); err != nil { t.Fatal(err) @@ -1225,7 +1231,8 @@ func TestCreateTenantZeroValues(t *testing.T) { options := (&TenantToCreate{}). DisplayName(""). AllowPasswordSignUp(false). - EnableEmailLinkSignIn(false) + EnableEmailLinkSignIn(false). + EnableAnonymousUser(false) tenant, err := client.TenantManager.CreateTenant(context.Background(), options) if err != nil { t.Fatal(err) @@ -1239,6 +1246,7 @@ func TestCreateTenantZeroValues(t *testing.T) { "displayName": "", "allowPasswordSignup": false, "enableEmailLinkSignin": false, + "enableAnonymousUser": false, } if err := checkCreateTenantRequest(s, wantBody); err != nil { t.Fatal(err) @@ -1274,7 +1282,8 @@ func TestUpdateTenant(t *testing.T) { options := (&TenantToUpdate{}). DisplayName(testTenant.DisplayName). AllowPasswordSignUp(testTenant.AllowPasswordSignUp). - EnableEmailLinkSignIn(testTenant.EnableEmailLinkSignIn) + EnableEmailLinkSignIn(testTenant.EnableEmailLinkSignIn). + EnableAnonymousUser(testTenant.EnableAnonymousUser) tenant, err := client.TenantManager.UpdateTenant(context.Background(), "tenantID", options) if err != nil { t.Fatal(err) @@ -1288,8 +1297,9 @@ func TestUpdateTenant(t *testing.T) { "displayName": testTenant.DisplayName, "allowPasswordSignup": testTenant.AllowPasswordSignUp, "enableEmailLinkSignin": testTenant.EnableEmailLinkSignIn, + "enableAnonymousUser": testTenant.EnableAnonymousUser, } - wantMask := []string{"allowPasswordSignup", "displayName", "enableEmailLinkSignin"} + wantMask := []string{"allowPasswordSignup", "displayName", "enableAnonymousUser", "enableEmailLinkSignin"} if err := checkUpdateTenantRequest(s, wantBody, wantMask); err != nil { t.Fatal(err) } @@ -1327,7 +1337,8 @@ func TestUpdateTenantZeroValues(t *testing.T) { options := (&TenantToUpdate{}). DisplayName(""). AllowPasswordSignUp(false). - EnableEmailLinkSignIn(false) + EnableEmailLinkSignIn(false). + EnableAnonymousUser(false) tenant, err := client.TenantManager.UpdateTenant(context.Background(), "tenantID", options) if err != nil { t.Fatal(err) @@ -1341,8 +1352,9 @@ func TestUpdateTenantZeroValues(t *testing.T) { "displayName": "", "allowPasswordSignup": false, "enableEmailLinkSignin": false, + "enableAnonymousUser": false, } - wantMask := []string{"allowPasswordSignup", "displayName", "enableEmailLinkSignin"} + wantMask := []string{"allowPasswordSignup", "displayName", "enableAnonymousUser", "enableEmailLinkSignin"} if err := checkUpdateTenantRequest(s, wantBody, wantMask); err != nil { t.Fatal(err) } diff --git a/go.sum b/go.sum index f3f313a4..490de1aa 100644 --- a/go.sum +++ b/go.sum @@ -231,7 +231,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= diff --git a/integration/auth/tenant_mgt_test.go b/integration/auth/tenant_mgt_test.go index 381bb61c..c5cefe4c 100644 --- a/integration/auth/tenant_mgt_test.go +++ b/integration/auth/tenant_mgt_test.go @@ -31,12 +31,14 @@ func TestTenantManager(t *testing.T) { DisplayName: "admin-go-tenant", AllowPasswordSignUp: true, EnableEmailLinkSignIn: true, + EnableAnonymousUser: true, } req := (&auth.TenantToCreate{}). DisplayName("admin-go-tenant"). AllowPasswordSignUp(true). - EnableEmailLinkSignIn(true) + EnableEmailLinkSignIn(true). + EnableAnonymousUser(true) created, err := client.TenantManager.CreateTenant(context.Background(), req) if err != nil { t.Fatalf("CreateTenant() = %v", err) @@ -129,11 +131,13 @@ func TestTenantManager(t *testing.T) { DisplayName: "updated-go-tenant", AllowPasswordSignUp: false, EnableEmailLinkSignIn: false, + EnableAnonymousUser: false, } req := (&auth.TenantToUpdate{}). DisplayName("updated-go-tenant"). AllowPasswordSignUp(false). - EnableEmailLinkSignIn(false) + EnableEmailLinkSignIn(false). + EnableAnonymousUser(false) tenant, err := client.TenantManager.UpdateTenant(context.Background(), id, req) if err != nil { t.Fatalf("UpdateTenant() = %v", err) From 0f7899fb9d33972aa4fd8350d5017baefc2efb00 Mon Sep 17 00:00:00 2001 From: sonatard Date: Fri, 17 Sep 2021 12:17:40 +0900 Subject: [PATCH 2/7] Use https://identitytoolkit.googleapis.com/v2 instead of https://identitytoolkit.googleapis.com/v2beta1 --- auth/auth_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/auth/auth_test.go b/auth/auth_test.go index 634345a1..cda65f03 100644 --- a/auth/auth_test.go +++ b/auth/auth_test.go @@ -39,8 +39,8 @@ const ( credEnvVar = "GOOGLE_APPLICATION_CREDENTIALS" testProjectID = "mock-project-id" testVersion = "test-version" - defaultIDToolkitV1Endpoint = "https://identitytoolkit.googleapis.com/v1" - defaultIDToolkitV2Beta1Endpoint = "https://identitytoolkit.googleapis.com/v2beta1" + defaultIDToolkitV1Endpoint = "https://identitytoolkit.googleapis.com/v1" + defaultIDToolkitV2Endpoint = "https://identitytoolkit.googleapis.com/v2" ) var ( @@ -291,7 +291,7 @@ func TestNewClientExplicitNoAuth(t *testing.T) { func TestNewClientEmulatorHostEnvVar(t *testing.T) { emulatorHost := "localhost:9099" idToolkitV1Endpoint := "http://localhost:9099/identitytoolkit.googleapis.com/v1" - idToolkitV2Beta1Endpoint := "http://localhost:9099/identitytoolkit.googleapis.com/v2beta1" + idToolkitV2Endpoint := "http://localhost:9099/identitytoolkit.googleapis.com/v2" os.Setenv(emulatorHostEnvVar, emulatorHost) defer os.Unsetenv(emulatorHostEnvVar) @@ -305,11 +305,11 @@ func TestNewClientEmulatorHostEnvVar(t *testing.T) { if baseClient.userManagementEndpoint != idToolkitV1Endpoint { t.Errorf("baseClient.userManagementEndpoint = %q; want = %q", baseClient.userManagementEndpoint, idToolkitV1Endpoint) } - if baseClient.providerConfigEndpoint != idToolkitV2Beta1Endpoint { - t.Errorf("baseClient.providerConfigEndpoint = %q; want = %q", baseClient.providerConfigEndpoint, idToolkitV2Beta1Endpoint) + if baseClient.providerConfigEndpoint != idToolkitV2Endpoint { + t.Errorf("baseClient.providerConfigEndpoint = %q; want = %q", baseClient.providerConfigEndpoint, idToolkitV2Endpoint) } - if baseClient.tenantMgtEndpoint != idToolkitV2Beta1Endpoint { - t.Errorf("baseClient.tenantMgtEndpoint = %q; want = %q", baseClient.tenantMgtEndpoint, idToolkitV2Beta1Endpoint) + if baseClient.tenantMgtEndpoint != idToolkitV2Endpoint { + t.Errorf("baseClient.tenantMgtEndpoint = %q; want = %q", baseClient.tenantMgtEndpoint, idToolkitV2Endpoint) } if _, ok := baseClient.signer.(emulatedSigner); !ok { t.Errorf("baseClient.signer = %#v; want = %#v", baseClient.signer, emulatedSigner{}) @@ -1427,11 +1427,11 @@ func checkBaseClient(client *Client, wantProjectID string) error { if baseClient.userManagementEndpoint != defaultIDToolkitV1Endpoint { return fmt.Errorf("userManagementEndpoint = %q; want = %q", baseClient.userManagementEndpoint, defaultIDToolkitV1Endpoint) } - if baseClient.providerConfigEndpoint != defaultIDToolkitV2Beta1Endpoint { - return fmt.Errorf("providerConfigEndpoint = %q; want = %q", baseClient.providerConfigEndpoint, defaultIDToolkitV2Beta1Endpoint) + if baseClient.providerConfigEndpoint != defaultIDToolkitV2Endpoint { + return fmt.Errorf("providerConfigEndpoint = %q; want = %q", baseClient.providerConfigEndpoint, defaultIDToolkitV2Endpoint) } - if baseClient.tenantMgtEndpoint != defaultIDToolkitV2Beta1Endpoint { - return fmt.Errorf("providerConfigEndpoint = %q; want = %q", baseClient.providerConfigEndpoint, defaultIDToolkitV2Beta1Endpoint) + if baseClient.tenantMgtEndpoint != defaultIDToolkitV2Endpoint { + return fmt.Errorf("providerConfigEndpoint = %q; want = %q", baseClient.providerConfigEndpoint, defaultIDToolkitV2Endpoint) } if baseClient.projectID != wantProjectID { return fmt.Errorf("projectID = %q; want = %q", baseClient.projectID, wantProjectID) From a3dfd67400fa85b353de2a82d1a7089bea1d5dd8 Mon Sep 17 00:00:00 2001 From: sonatard Date: Fri, 25 Mar 2022 10:51:34 +0900 Subject: [PATCH 3/7] Rename EnableAnonymousUser to EnableAnonymousUsers --- auth/tenant_mgt.go | 10 +++++----- auth/tenant_mgt_test.go | 16 ++++++++-------- integration/auth/tenant_mgt_test.go | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/auth/tenant_mgt.go b/auth/tenant_mgt.go index 98af99c1..00671b21 100644 --- a/auth/tenant_mgt.go +++ b/auth/tenant_mgt.go @@ -47,7 +47,7 @@ type Tenant struct { DisplayName string `json:"displayName"` AllowPasswordSignUp bool `json:"allowPasswordSignup"` EnableEmailLinkSignIn bool `json:"enableEmailLinkSignin"` - EnableAnonymousUser bool `json:"enableAnonymousUser"` + EnableAnonymousUsers bool `json:"enableAnonymousUser"` } // TenantClient is used for managing users, configuring SAML/OIDC providers, and generating email @@ -242,8 +242,8 @@ func (t *TenantToCreate) EnableEmailLinkSignIn(enable bool) *TenantToCreate { return t.set(enableEmailLinkSignInKey, enable) } -// EnableAnonymousUser enables or disables anonymous user. -func (t *TenantToCreate) EnableAnonymousUser(enable bool) *TenantToCreate { +// EnableAnonymousUsers enables or disables anonymous user. +func (t *TenantToCreate) EnableAnonymousUsers(enable bool) *TenantToCreate { return t.set(enableAnonymousUser, enable) } @@ -282,8 +282,8 @@ func (t *TenantToUpdate) EnableEmailLinkSignIn(enable bool) *TenantToUpdate { return t.set(enableEmailLinkSignInKey, enable) } -// EnableAnonymousUser enables or disables anonymous user. -func (t *TenantToUpdate) EnableAnonymousUser(enable bool) *TenantToUpdate { +// EnableAnonymousUsers enables or disables anonymous user. +func (t *TenantToUpdate) EnableAnonymousUsers(enable bool) *TenantToUpdate { return t.set(enableAnonymousUser, enable) } diff --git a/auth/tenant_mgt_test.go b/auth/tenant_mgt_test.go index 7e4ae165..1e9e2b91 100644 --- a/auth/tenant_mgt_test.go +++ b/auth/tenant_mgt_test.go @@ -1107,7 +1107,7 @@ var testTenant = &Tenant{ DisplayName: "Test Tenant", AllowPasswordSignUp: true, EnableEmailLinkSignIn: true, - EnableAnonymousUser: true, + EnableAnonymousUsers: true, } var testTenant2 = &Tenant{ @@ -1115,7 +1115,7 @@ var testTenant2 = &Tenant{ DisplayName: "Test Tenant 2", AllowPasswordSignUp: true, EnableEmailLinkSignIn: true, - EnableAnonymousUser: true, + EnableAnonymousUsers: true, } func TestTenant(t *testing.T) { @@ -1182,7 +1182,7 @@ func TestCreateTenant(t *testing.T) { DisplayName(testTenant.DisplayName). AllowPasswordSignUp(testTenant.AllowPasswordSignUp). EnableEmailLinkSignIn(testTenant.EnableEmailLinkSignIn). - EnableAnonymousUser(testTenant.EnableAnonymousUser) + EnableAnonymousUsers(testTenant.EnableAnonymousUsers) tenant, err := client.TenantManager.CreateTenant(context.Background(), options) if err != nil { t.Fatal(err) @@ -1196,7 +1196,7 @@ func TestCreateTenant(t *testing.T) { "displayName": testTenant.DisplayName, "allowPasswordSignup": testTenant.AllowPasswordSignUp, "enableEmailLinkSignin": testTenant.EnableEmailLinkSignIn, - "enableAnonymousUser": testTenant.EnableAnonymousUser, + "enableAnonymousUser": testTenant.EnableAnonymousUsers, } if err := checkCreateTenantRequest(s, wantBody); err != nil { t.Fatal(err) @@ -1232,7 +1232,7 @@ func TestCreateTenantZeroValues(t *testing.T) { DisplayName(""). AllowPasswordSignUp(false). EnableEmailLinkSignIn(false). - EnableAnonymousUser(false) + EnableAnonymousUsers(false) tenant, err := client.TenantManager.CreateTenant(context.Background(), options) if err != nil { t.Fatal(err) @@ -1283,7 +1283,7 @@ func TestUpdateTenant(t *testing.T) { DisplayName(testTenant.DisplayName). AllowPasswordSignUp(testTenant.AllowPasswordSignUp). EnableEmailLinkSignIn(testTenant.EnableEmailLinkSignIn). - EnableAnonymousUser(testTenant.EnableAnonymousUser) + EnableAnonymousUsers(testTenant.EnableAnonymousUsers) tenant, err := client.TenantManager.UpdateTenant(context.Background(), "tenantID", options) if err != nil { t.Fatal(err) @@ -1297,7 +1297,7 @@ func TestUpdateTenant(t *testing.T) { "displayName": testTenant.DisplayName, "allowPasswordSignup": testTenant.AllowPasswordSignUp, "enableEmailLinkSignin": testTenant.EnableEmailLinkSignIn, - "enableAnonymousUser": testTenant.EnableAnonymousUser, + "enableAnonymousUser": testTenant.EnableAnonymousUsers, } wantMask := []string{"allowPasswordSignup", "displayName", "enableAnonymousUser", "enableEmailLinkSignin"} if err := checkUpdateTenantRequest(s, wantBody, wantMask); err != nil { @@ -1338,7 +1338,7 @@ func TestUpdateTenantZeroValues(t *testing.T) { DisplayName(""). AllowPasswordSignUp(false). EnableEmailLinkSignIn(false). - EnableAnonymousUser(false) + EnableAnonymousUsers(false) tenant, err := client.TenantManager.UpdateTenant(context.Background(), "tenantID", options) if err != nil { t.Fatal(err) diff --git a/integration/auth/tenant_mgt_test.go b/integration/auth/tenant_mgt_test.go index c5cefe4c..190a29f4 100644 --- a/integration/auth/tenant_mgt_test.go +++ b/integration/auth/tenant_mgt_test.go @@ -31,14 +31,14 @@ func TestTenantManager(t *testing.T) { DisplayName: "admin-go-tenant", AllowPasswordSignUp: true, EnableEmailLinkSignIn: true, - EnableAnonymousUser: true, + EnableAnonymousUsers: true, } req := (&auth.TenantToCreate{}). DisplayName("admin-go-tenant"). AllowPasswordSignUp(true). EnableEmailLinkSignIn(true). - EnableAnonymousUser(true) + EnableAnonymousUsers(true) created, err := client.TenantManager.CreateTenant(context.Background(), req) if err != nil { t.Fatalf("CreateTenant() = %v", err) @@ -131,13 +131,13 @@ func TestTenantManager(t *testing.T) { DisplayName: "updated-go-tenant", AllowPasswordSignUp: false, EnableEmailLinkSignIn: false, - EnableAnonymousUser: false, + EnableAnonymousUsers: false, } req := (&auth.TenantToUpdate{}). DisplayName("updated-go-tenant"). AllowPasswordSignUp(false). EnableEmailLinkSignIn(false). - EnableAnonymousUser(false) + EnableAnonymousUsers(false) tenant, err := client.TenantManager.UpdateTenant(context.Background(), id, req) if err != nil { t.Fatalf("UpdateTenant() = %v", err) From 2600d0026dbc0af26ae096a80cbe4911773f0995 Mon Sep 17 00:00:00 2001 From: sonatard Date: Sat, 26 Mar 2022 10:20:20 +0900 Subject: [PATCH 4/7] go mod download golang.org/x/lint --- go.sum | 1 + 1 file changed, 1 insertion(+) diff --git a/go.sum b/go.sum index 490de1aa..f3f313a4 100644 --- a/go.sum +++ b/go.sum @@ -231,6 +231,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= From 41db8d33ceb9b5ac16fe52e8c8809f27b5c2c8e7 Mon Sep 17 00:00:00 2001 From: sonatard Date: Thu, 31 Mar 2022 11:08:01 +0900 Subject: [PATCH 5/7] go fmt ./... --- auth/auth_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth/auth_test.go b/auth/auth_test.go index cda65f03..30fbde88 100644 --- a/auth/auth_test.go +++ b/auth/auth_test.go @@ -36,9 +36,9 @@ import ( ) const ( - credEnvVar = "GOOGLE_APPLICATION_CREDENTIALS" - testProjectID = "mock-project-id" - testVersion = "test-version" + credEnvVar = "GOOGLE_APPLICATION_CREDENTIALS" + testProjectID = "mock-project-id" + testVersion = "test-version" defaultIDToolkitV1Endpoint = "https://identitytoolkit.googleapis.com/v1" defaultIDToolkitV2Endpoint = "https://identitytoolkit.googleapis.com/v2" ) From 9d6bfe98a5dc3c04645c2036089851e825d261f5 Mon Sep 17 00:00:00 2001 From: sonatard Date: Fri, 1 Apr 2022 12:59:33 +0900 Subject: [PATCH 6/7] Update auth/tenant_mgt.go Co-authored-by: Lahiru Maramba --- auth/tenant_mgt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/tenant_mgt.go b/auth/tenant_mgt.go index 00671b21..d35b28f1 100644 --- a/auth/tenant_mgt.go +++ b/auth/tenant_mgt.go @@ -242,7 +242,7 @@ func (t *TenantToCreate) EnableEmailLinkSignIn(enable bool) *TenantToCreate { return t.set(enableEmailLinkSignInKey, enable) } -// EnableAnonymousUsers enables or disables anonymous user. +// EnableAnonymousUsers enables or disables anonymous authentication. func (t *TenantToCreate) EnableAnonymousUsers(enable bool) *TenantToCreate { return t.set(enableAnonymousUser, enable) } From 6e3fc836b58f5013e50792833301bdf894a6864d Mon Sep 17 00:00:00 2001 From: sonatard Date: Fri, 1 Apr 2022 12:59:39 +0900 Subject: [PATCH 7/7] Update auth/tenant_mgt.go Co-authored-by: Lahiru Maramba --- auth/tenant_mgt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/tenant_mgt.go b/auth/tenant_mgt.go index d35b28f1..9212a8e2 100644 --- a/auth/tenant_mgt.go +++ b/auth/tenant_mgt.go @@ -282,7 +282,7 @@ func (t *TenantToUpdate) EnableEmailLinkSignIn(enable bool) *TenantToUpdate { return t.set(enableEmailLinkSignInKey, enable) } -// EnableAnonymousUsers enables or disables anonymous user. +// EnableAnonymousUsers enables or disables anonymous authentication. func (t *TenantToUpdate) EnableAnonymousUsers(enable bool) *TenantToUpdate { return t.set(enableAnonymousUser, enable) }