mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: fix XML bug in GenerateCasToken()
This commit is contained in:
parent
1276da4daa
commit
ece060d03d
@ -79,7 +79,7 @@ type CasUserAttributes struct {
|
||||
type CasNamedAttribute struct {
|
||||
XMLName xml.Name `xml:"cas:attribute" json:"-"`
|
||||
Name string `xml:"name,attr,omitempty"`
|
||||
Value interface{} `xml:",innerxml"`
|
||||
Value string `xml:",innerxml"`
|
||||
}
|
||||
|
||||
type CasAnyAttribute struct {
|
||||
@ -219,7 +219,7 @@ func GenerateCasToken(userId string, service string) (string, error) {
|
||||
if v != "" {
|
||||
authenticationSuccess.Attributes.UserAttributes.Attributes = append(authenticationSuccess.Attributes.UserAttributes.Attributes, &CasNamedAttribute{
|
||||
Name: k,
|
||||
Value: v,
|
||||
Value: fmt.Sprintf("%v", v),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user