Add azure groups support and oauth2 v2.0

This commit is contained in:
Adrian Aneci
2022-10-21 20:23:21 +03:00
parent 7fe6384f38
commit a5d918898c
12 changed files with 339 additions and 155 deletions
+13
View File
@@ -149,3 +149,16 @@ func isHostnameAllowed(hostname, allowedHost string) bool {
return false
}
// RemoveDuplicateStr removes duplicates from a slice of strings.
func RemoveDuplicateStr(strSlice []string) []string {
allKeys := make(map[string]struct{})
var list []string
for _, item := range strSlice {
if _, ok := allKeys[item]; !ok {
allKeys[item] = struct{}{}
list = append(list, item)
}
}
return list
}