package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
guardian "github.com/auth0/go-auth0/management/management/guardian"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &guardian.SetGuardianFactorRequestContent{
Enabled: true,
}
client.Guardian.Factors.Set(
context.TODO(),
management.GuardianFactorNameEnumPushNotification.Ptr(),
request,
)
}{
"enabled": true
}Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor.
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
guardian "github.com/auth0/go-auth0/management/management/guardian"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &guardian.SetGuardianFactorRequestContent{
Enabled: true,
}
client.Guardian.Factors.Set(
context.TODO(),
management.GuardianFactorNameEnumPushNotification.Ptr(),
request,
)
}{
"enabled": true
}Documentation Index
Fetch the complete documentation index at: https://auth0-feat-testing-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Factor name. Can be sms, push-notification, email, duo otp webauthn-roaming, webauthn-platform, or recovery-code.
push-notification, sms, email, duo, otp, webauthn-roaming, webauthn-platform, recovery-code 1Whether this factor is enabled (true) or disabled (false).
Factor updated successfully.
Whether this factor is enabled (true) or disabled (false).
このページは役に立ちましたか?