select creds
This commit is contained in:
parent
79a0248049
commit
053323719e
@ -2,6 +2,7 @@ package credentials
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -32,6 +33,19 @@ func GetM365() M365 {
|
|||||||
fmt.Println("---------------> check", strings.Contains(AzureClientID, ","))
|
fmt.Println("---------------> check", strings.Contains(AzureClientID, ","))
|
||||||
fmt.Println("---------------> check", strings.Contains(AzureClientSecret, ","))
|
fmt.Println("---------------> check", strings.Contains(AzureClientSecret, ","))
|
||||||
|
|
||||||
|
randomNumber := rand.Intn(4) + 1
|
||||||
|
fmt.Println("---------> random", randomNumber)
|
||||||
|
|
||||||
|
if strings.Contains(AzureClientID, ",") {
|
||||||
|
AzureClientIDs := strings.Split(AzureClientID, ",")
|
||||||
|
AzureClientID = AzureClientIDs[randomNumber]
|
||||||
|
}
|
||||||
|
|
||||||
|
if strings.Contains(AzureClientID, ",") {
|
||||||
|
AzureClientSecrets := strings.Split(AzureClientSecret, ",")
|
||||||
|
AzureClientSecret = AzureClientSecrets[randomNumber]
|
||||||
|
}
|
||||||
|
|
||||||
return M365{
|
return M365{
|
||||||
AzureClientID: AzureClientID,
|
AzureClientID: AzureClientID,
|
||||||
AzureClientSecret: AzureClientSecret,
|
AzureClientSecret: AzureClientSecret,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user