From fcdbc09502c6e69d30a3a74bd2de7ce5368d3b6c Mon Sep 17 00:00:00 2001 From: Spring_MT Date: Mon, 7 Oct 2024 13:07:39 +0900 Subject: [PATCH] feat: support sign_in_attributes for SAML --- auth/auth.go | 7 ++++--- auth/auth_test.go | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/auth/auth.go b/auth/auth.go index d6299611..e217b27e 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -266,9 +266,10 @@ type Token struct { // // This data is provided by the Firebase Auth service and is a reserved claim in the ID token. type FirebaseInfo struct { - SignInProvider string `json:"sign_in_provider"` - Tenant string `json:"tenant"` - Identities map[string]interface{} `json:"identities"` + SignInProvider string `json:"sign_in_provider"` + SignInAttributes map[string]interface{} `json:"sign_in_attributes"` + Tenant string `json:"tenant"` + Identities map[string]interface{} `json:"identities"` } // baseClient exposes the APIs common to both auth.Client and auth.TenantClient. diff --git a/auth/auth_test.go b/auth/auth_test.go index 30fbde88..c51b2980 100644 --- a/auth/auth_test.go +++ b/auth/auth_test.go @@ -1362,8 +1362,9 @@ func getIDTokenWithSignerAndKid(signer cryptoSigner, kid string, p mockIDTokenPa "auth_time": testClock.Now().Unix() - 100, "sub": "1234567890", "firebase": map[string]interface{}{ - "identities": map[string]interface{}{}, - "sign_in_provider": "custom", + "identities": map[string]interface{}{}, + "sign_in_provider": "custom", + "sign_in_attributes": map[string]interface{}{}, }, "admin": true, }