Class GuardianEntity

java.lang.Object
com.auth0.client.mgmt.GuardianEntity

public class GuardianEntity extends Object
Class that provides an implementation of the Guardian methods of the Management API as defined in https://auth0.com/docs/api/management/v2#!/Guardian

This class is not thread-safe.

See Also:
ManagementAPI
  • Field Details

    • client

      protected final okhttp3.OkHttpClient client
    • baseUrl

      protected final okhttp3.HttpUrl baseUrl
    • apiToken

      protected final String apiToken
  • Method Details

    • createEnrollmentTicket

      public Request<EnrollmentTicket> createEnrollmentTicket(EnrollmentTicket enrollmentTicket)
      Create a Guardian Enrollment Ticket. A token with scope create:guardian_enrollment_tickets is needed.
      Parameters:
      enrollmentTicket - the enrollment ticket data to set.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • deleteEnrollment

      public Request<Void> deleteEnrollment(String enrollmentId)
      Delete an existing Guardian Enrollment. A token with scope delete:guardian_enrollments is needed.
      Parameters:
      enrollmentId - the id of the enrollment to retrieve.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • getTemplates

      public Request<GuardianTemplates> getTemplates()
      Request the Guardian SMS enrollment and verification templates. A token with scope read:guardian_factors is needed.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • updateTemplates

      public Request<GuardianTemplates> updateTemplates(GuardianTemplates guardianTemplates)
      Updates the existing Guardian SMS enrollment and verification templates. A token with scope update:guardian_factors is needed.
      Parameters:
      guardianTemplates - the templates data to set.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • listFactors

      public Request<List<Factor>> listFactors()
      Request all the Guardian Factors. A token with scope read:guardian_factors is needed.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • updateFactor

      public Request<Factor> updateFactor(String name, Boolean enabled)
      Update an existing Guardian Factor. A token with scope update:guardian_factors is needed.
      Parameters:
      name - the name of the Factor to update.
      enabled - whether to enable or disable the Factor.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • getTwilioFactorProvider

      public Request<TwilioFactorProvider> getTwilioFactorProvider()
      Request Guardian's Twilio SMS Factor Provider settings. A token with scope read:guardian_factors is needed.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • updateTwilioFactorProvider

      public Request<TwilioFactorProvider> updateTwilioFactorProvider(TwilioFactorProvider provider)
      Update Guardian's Twilio SMS Factor Provider. A token with scope update:guardian_factors is needed.
      Parameters:
      provider - the provider data to set.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • resetTwilioFactorProvider

      public Request<TwilioFactorProvider> resetTwilioFactorProvider()
      Reset Guardian's Twilio SMS Factor Provider to the defaults. A token with scope update:guardian_factors is needed.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • getSNSFactorProvider

      public Request<SNSFactorProvider> getSNSFactorProvider()
      Request Guardian's SNS push-notification Factor Provider. A token with scope read:guardian_factors is needed.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • updateSNSFactorProvider

      public Request<SNSFactorProvider> updateSNSFactorProvider(SNSFactorProvider provider)
      Update Guardian's SNS push-notification Factor Provider. A token with scope update:guardian_factors is needed.
      Parameters:
      provider - the provider data to set.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • resetSNSFactorProvider

      public Request<SNSFactorProvider> resetSNSFactorProvider()
      Reset Guardian's SNS push-notification Factor Provider to the defaults. A token with scope update:guardian_factors is needed.
      Returns:
      a Request to execute.
      See Also:
      Management API2 docs
    • getAuthenticationPolicies

      public Request<List<String>> getAuthenticationPolicies()
      Get Guardian's MFA authentication policies. A token with scope read:mfa_policies is needed.
      Returns:
      a Request to execute
      See Also:
      Management API2 docs
    • updateAuthenticationPolicies

      public Request<List<String>> updateAuthenticationPolicies(List<String> policies)
      Updates Guardian's MFA authentication policies. A token with scope update:mfa_policies is needed.
      Returns:
      a Request to execute
      See Also:
      Management API2 docs