mirror of
https://github.com/LukeHagar/sailpoint-cli.git
synced 2025-12-09 12:47:44 +00:00
22 lines
326 B
Go
22 lines
326 B
Go
package util
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
func GetAuthType() string {
|
|
return strings.ToLower(viper.GetString("authtype"))
|
|
}
|
|
|
|
func GetBasePath() string {
|
|
switch GetAuthType() {
|
|
case "oauth":
|
|
return viper.GetString("oauth.baseurl")
|
|
case "pat":
|
|
return viper.GetString("pat.baseurl")
|
|
}
|
|
return ""
|
|
}
|