select creds
This commit is contained in:
parent
79a0248049
commit
053323719e
@ -2,6 +2,7 @@ package credentials
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@ -32,6 +33,19 @@ func GetM365() M365 {
|
||||
fmt.Println("---------------> check", strings.Contains(AzureClientID, ","))
|
||||
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{
|
||||
AzureClientID: AzureClientID,
|
||||
AzureClientSecret: AzureClientSecret,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user