Class TwilioFactorProvider

java.lang.Object
com.auth0.json.mgmt.guardian.TwilioFactorProvider

public class TwilioFactorProvider extends Object
Class that represents a Guardian's SMS Factor Provider for Twilio. Related to the GuardianEntity entity.
  • Constructor Details

    • TwilioFactorProvider

      @Deprecated public TwilioFactorProvider()
      Deprecated.
      use the full constructor instead
      Creates an empty Twilio settings object
    • TwilioFactorProvider

      public TwilioFactorProvider(String from, String messagingServiceSID, String authToken, String sid) throws IllegalArgumentException
      Creates a Twilio settings object You must only specify either a non-null `from` or `messagingServiceSID`, but not both.
      Parameters:
      from - the Twilio From number.
      messagingServiceSID - the Twilio Messaging Service SID.
      authToken - the Twilio auth token.
      sid - the Twilio SID.
      Throws:
      IllegalArgumentException - when both `from` and `messagingServiceSID` are set
  • Method Details

    • getFrom

      public String getFrom()
      Getter for the Twilio From number.
      Returns:
      the from number.
    • setFrom

      @Deprecated public void setFrom(String from) throws IllegalArgumentException
      Deprecated.
      use the constructor instead
      Setter for the Twilio From number.
      Parameters:
      from - the from number to set.
      Throws:
      IllegalArgumentException - when both `from` and `messagingServiceSID` are set
    • getMessagingServiceSID

      public String getMessagingServiceSID()
      Getter for the Twilio Messaging Service SID.
      Returns:
      the messaging service SID.
    • setMessagingServiceSID

      @Deprecated public void setMessagingServiceSID(String messagingServiceSID) throws IllegalArgumentException
      Deprecated.
      use the constructor instead
      Setter for the Twilio Messaging Service SID.
      Parameters:
      messagingServiceSID - the messaging service SID.
      Throws:
      IllegalArgumentException - when both `from` and `messagingServiceSID` are set
    • getAuthToken

      public String getAuthToken()
      Getter for the Twilio auth token.
      Returns:
      the Twilio auth token.
    • setAuthToken

      @Deprecated public void setAuthToken(String authToken)
      Deprecated.
      use the constructor instead
      Setter for the Twilio auth token.
      Parameters:
      authToken - the Twilio auth token to set.
    • getSID

      public String getSID()
      Getter for the Twilio SID
      Returns:
      the Twilio SID.
    • setSID

      @Deprecated public void setSID(String SID)
      Deprecated.
      use the constructor instead
      Setter for the Twilio SID
      Parameters:
      SID - the Twilio SID to set.