Fix JSON issue in GenerateCasToken()

This commit is contained in:
Yang Luo 2023-09-13 16:45:11 +08:00
parent ea1414dfd0
commit bb04b10e8b

View File

@ -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