mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-08 20:37:46 +00:00
update go docs and examples
This commit is contained in:
@@ -66,16 +66,20 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
|
||||
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
method := okta-verify # string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'. # string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'.
|
||||
method := `okta-verify` // string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'. # string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'.
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.DeleteMFAConfig(context.Background(), method).Execute()
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.DeleteMFAConfig(context.Background(), method).Execute()
|
||||
//resp, r, err := apiClient.V3.MFAConfigurationAPI.DeleteMFAConfig(context.Background(), method).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.DeleteMFAConfig``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -120,15 +124,19 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
|
||||
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFADuoConfig(context.Background()).Execute()
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFADuoConfig(context.Background()).Execute()
|
||||
//resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFADuoConfig(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.GetMFADuoConfig``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -177,16 +185,20 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
|
||||
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
allLanguages := allLanguages=true # bool | Indicator whether the question text should be returned in all configured languages * If true, the question text is returned in all languages that it is configured in. * If false, the question text is returned in the user locale if available, else for the default locale. * If not passed, it behaves the same way as passing this parameter as false (optional) # bool | Indicator whether the question text should be returned in all configured languages * If true, the question text is returned in all languages that it is configured in. * If false, the question text is returned in the user locale if available, else for the default locale. * If not passed, it behaves the same way as passing this parameter as false (optional)
|
||||
allLanguages := allLanguages=true // bool | Indicator whether the question text should be returned in all configured languages * If true, the question text is returned in all languages that it is configured in. * If false, the question text is returned in the user locale if available, else for the default locale. * If not passed, it behaves the same way as passing this parameter as false (optional) # bool | Indicator whether the question text should be returned in all configured languages * If true, the question text is returned in all languages that it is configured in. * If false, the question text is returned in the user locale if available, else for the default locale. * If not passed, it behaves the same way as passing this parameter as false (optional)
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFAKbaConfig(context.Background()).AllLanguages(allLanguages).Execute()
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFAKbaConfig(context.Background()).Execute()
|
||||
//resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFAKbaConfig(context.Background()).AllLanguages(allLanguages).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.GetMFAKbaConfig``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -231,15 +243,19 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
|
||||
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFAOktaConfig(context.Background()).Execute()
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFAOktaConfig(context.Background()).Execute()
|
||||
//resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFAOktaConfig(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.GetMFAOktaConfig``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -288,12 +304,13 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
"encoding/json"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
mfaDuoConfig := fmt.Sprintf(`{
|
||||
data := []byte(`{
|
||||
"accessKey" : "qw123Y3QlA5UqocYpdU3rEkzrK2D497y",
|
||||
"host" : "example.com",
|
||||
"configProperties" : {
|
||||
@@ -303,11 +320,20 @@ func main() {
|
||||
"mfaMethod" : "duo-web",
|
||||
"enabled" : true,
|
||||
"identityAttribute" : "email"
|
||||
}`) # MfaDuoConfig |
|
||||
}`) // MfaDuoConfig |
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFADuoConfig(context.Background()).MfaDuoConfig(mfaDuoConfig).Execute()
|
||||
|
||||
var mfaDuoConfig v3.MfaDuoConfig
|
||||
if err := json.Unmarshal(data, &mfaDuoConfig); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFADuoConfig(context.Background()).MfaDuoConfig(mfaDuoConfig).Execute()
|
||||
//resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFADuoConfig(context.Background()).MfaDuoConfig(mfaDuoConfig).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.SetMFADuoConfig``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -356,16 +382,26 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
"encoding/json"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
kbaAnswerRequestItem := fmt.Sprintf(`[{id=173423, answer=822cd15d6c15aa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a0859a2fea34}, {id=c54fee53-2d63-4fc5-9259-3e93b9994135, answer=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08}]`) # []KbaAnswerRequestItem |
|
||||
kbaAnswerRequestItem := fmt.Sprintf(`[{id=173423, answer=822cd15d6c15aa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a0859a2fea34}, {id=c54fee53-2d63-4fc5-9259-3e93b9994135, answer=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08}]`) // []KbaAnswerRequestItem |
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFAKBAConfig(context.Background()).KbaAnswerRequestItem(kbaAnswerRequestItem).Execute()
|
||||
|
||||
var kbaAnswerRequestItem v3.KbaAnswerRequestItem
|
||||
if err := json.Unmarshal(data, &kbaAnswerRequestItem); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFAKBAConfig(context.Background()).KbaAnswerRequestItem(kbaAnswerRequestItem).Execute()
|
||||
//resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFAKBAConfig(context.Background()).KbaAnswerRequestItem(kbaAnswerRequestItem).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.SetMFAKBAConfig``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -414,22 +450,32 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
"encoding/json"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
mfaOktaConfig := fmt.Sprintf(`{
|
||||
data := []byte(`{
|
||||
"accessKey" : "qw123Y3QlA5UqocYpdU3rEkzrK2D497y",
|
||||
"host" : "example.com",
|
||||
"mfaMethod" : "okta-verify",
|
||||
"enabled" : true,
|
||||
"identityAttribute" : "email"
|
||||
}`) # MfaOktaConfig |
|
||||
}`) // MfaOktaConfig |
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFAOktaConfig(context.Background()).MfaOktaConfig(mfaOktaConfig).Execute()
|
||||
|
||||
var mfaOktaConfig v3.MfaOktaConfig
|
||||
if err := json.Unmarshal(data, &mfaOktaConfig); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFAOktaConfig(context.Background()).MfaOktaConfig(mfaOktaConfig).Execute()
|
||||
//resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFAOktaConfig(context.Background()).MfaOktaConfig(mfaOktaConfig).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.SetMFAOktaConfig``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -482,16 +528,20 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
|
||||
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
method := okta-verify # string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'. # string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'.
|
||||
method := `okta-verify` // string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'. # string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'.
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.TestMFAConfig(context.Background(), method).Execute()
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.MFAConfigurationAPI.TestMFAConfig(context.Background(), method).Execute()
|
||||
//resp, r, err := apiClient.V3.MFAConfigurationAPI.TestMFAConfig(context.Background(), method).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.TestMFAConfig``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
|
||||
Reference in New Issue
Block a user