From bb04b10e8bfe3d48db3248a767ddd7e865ca41c6 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Wed, 13 Sep 2023 16:45:11 +0800 Subject: [PATCH] Fix JSON issue in GenerateCasToken() --- object/token_cas.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/object/token_cas.go b/object/token_cas.go index a29150ad..cdc01cd5 100644 --- a/object/token_cas.go +++ b/object/token_cas.go @@ -77,9 +77,9 @@ type CasUserAttributes struct { } type CasNamedAttribute struct { - XMLName xml.Name `xml:"cas:attribute" json:"-"` - Name string `xml:"name,attr,omitempty"` - Value string `xml:",innerxml"` + XMLName xml.Name `xml:"cas:attribute" json:"-"` + Name string `xml:"name,attr,omitempty"` + Value interface{} `xml:",innerxml"` } type CasAnyAttribute struct { @@ -209,7 +209,7 @@ func GenerateCasToken(userId string, service string) (string, error) { return "", err } - tmp := map[string]string{} + tmp := map[string]interface{}{} err = json.Unmarshal(data, &tmp) if err != nil { return "", err