mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-18 22:41:04 +02:00
Add azure groups support and oauth2 v2.0
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user