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:
Steve0x2a
2021-12-27 18:55:25 +08:00
committed by GitHub
parent 9943e3c316
commit 067ae5448f
2 changed files with 32 additions and 3 deletions

View File

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