Add PathType details in external auth location

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-11-12 13:42:12 -03:00
parent 10f2673c4e
commit 2ca1f92697

View file

@ -427,7 +427,13 @@ func buildAuthLocation(input interface{}, globalExternalAuthURL string) string {
str := base64.URLEncoding.EncodeToString([]byte(location.Path))
// removes "=" after encoding
str = strings.Replace(str, "=", "", -1)
return fmt.Sprintf("/_external-auth-%v", str)
pathType := "default"
if location.PathType != nil {
pathType = fmt.Sprintf("%v", *location.PathType)
}
return fmt.Sprintf("/_external-auth-%v-%v", str, pathType)
}
// shouldApplyGlobalAuth returns true only in case when ExternalAuth.URL is not set and