mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: fix XML format issue in GenerateCasToken()
This commit is contained in:
parent
ece060d03d
commit
ce7a2e924b
@ -216,10 +216,15 @@ func GenerateCasToken(userId string, service string) (string, error) {
|
||||
}
|
||||
|
||||
for k, v := range tmp {
|
||||
value := fmt.Sprintf("%v", v)
|
||||
if value == "<nil>" || value == "[]" || value == "map[]" {
|
||||
value = ""
|
||||
}
|
||||
|
||||
if v != "" {
|
||||
authenticationSuccess.Attributes.UserAttributes.Attributes = append(authenticationSuccess.Attributes.UserAttributes.Attributes, &CasNamedAttribute{
|
||||
Name: k,
|
||||
Value: fmt.Sprintf("%v", v),
|
||||
Value: value,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user