From 87cf95e3d3f7f127d1cb516c534fd1828dd9040c Mon Sep 17 00:00:00 2001 From: Spring_MT Date: Thu, 21 Nov 2024 10:05:03 +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 0bda04a0..a64ba248 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -269,9 +269,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 2a00220b..7b735265 100644 --- a/auth/auth_test.go +++ b/auth/auth_test.go @@ -1363,8 +1363,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, }