mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
fix: idp using goth shows wrong display name (#398)
* fix: adjust the accessToken field Signed-off-by: 0x2a <stevesough@gmail.com> * fix: missing name and owner Signed-off-by: 0x2a <stevesough@gmail.com> * fix: get wrong display name Signed-off-by: 0x2a <stevesough@gmail.com>
This commit is contained in:
@ -23,6 +23,7 @@ import (
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
@ -180,3 +181,14 @@ func SnakeString(s string) string {
|
||||
}
|
||||
return strings.ToLower(string(data[:]))
|
||||
}
|
||||
|
||||
func IsChinese(str string) bool {
|
||||
var flag bool
|
||||
for _, v := range str {
|
||||
if unicode.Is(unicode.Han, v) {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
return flag
|
||||
}
|
||||
|
Reference in New Issue
Block a user