com.softlayer.api.service.user.customer.external.binding.Phone Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of softlayer-api-client Show documentation
Show all versions of softlayer-api-client Show documentation
API client for accessing the SoftLayer API
package com.softlayer.api.service.user.customer.external.binding;
import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.container.user.customer.external.binding.phone.Mode;
import com.softlayer.api.service.user.customer.external.Binding;
import com.softlayer.api.service.user.external.binding.Attribute;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_User_Customer_External_Binding_Phone data type contains information about an external binding that uses a phone call, SMS or mobile app for 2 form factor authentication. The external binding information is used when a SoftLayer customer logs into the SoftLayer customer portal or VPN to authenticate them against a trusted 3rd party, in this case using a mobile phone, mobile phone application or land-line phone.
*
* SoftLayer users with an active external binding will be prohibited from using the API for security reasons.
*
* @see SoftLayer_User_Customer_External_Binding_Phone
*/
@ApiType("SoftLayer_User_Customer_External_Binding_Phone")
public class Phone extends Binding {
/**
* The current external binding status. It can be "ACTIVE" or "BLOCKED".
*/
@ApiProperty
protected String bindingStatus;
public String getBindingStatus() {
return bindingStatus;
}
public void setBindingStatus(String bindingStatus) {
this.bindingStatus = bindingStatus;
}
@ApiProperty
protected String pinLength;
public String getPinLength() {
return pinLength;
}
public void setPinLength(String pinLength) {
this.pinLength = pinLength;
}
public Service asService(ApiClient client) {
return service(client, id);
}
public static Service service(ApiClient client) {
return client.createService(Service.class, null);
}
public static Service service(ApiClient client, Long id) {
return client.createService(Service.class, id == null ? null : id.toString());
}
/**
* SoftLayer provides its customers the ability to add an additional layer of security to the SoftLayer customer portal by requiring that a user login and authenticate with a trusted 3rd party before they are given access to their SoftLayer account. This is accomplished by creating an external binding for a specific vendor such as PhoneFactor. When the SoftLayer user attempts to log in to the SoftLayer customer portal or VPN, they will first be prompted for their normal SoftLayer username and password. Once that information is verified they will be asked to authenticate via phone, SMS or mobile phone application. Once authenticated with the trusted vendor the user will be allowed access to the SoftLayer customer portal or VPN.
*
* The Phone external binding service allows a user to create an external binding, enable, disable, or unlock an external binding, and delete an external binding.
*
* Once a SoftLayer user has a valid and active external binding, they will be required to always use their credential to login to the SoftLayer customer portal. In addition any user with an active external binding will be prohibited from using the API.
*
* @see SoftLayer_User_Customer_External_Binding_Phone
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_User_Customer_External_Binding_Phone")
public static interface Service extends Binding.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Return a phone validation result.
*
* @see SoftLayer_User_Customer_External_Binding_Phone::checkPhoneValidationResult
*/
@ApiMethod(instanceRequired = true)
public Boolean checkPhoneValidationResult(String token);
/**
* Disabling an external binding will allow you to keep the external binding on your SoftLayer account, but will not require you to authentication with our trusted 2 form factor vendor when logging into the SoftLayer customer portal.
*
* You may supply one of the following reason when you disable an external binding:
* *Unspecified
* *TemporarilyUnavailable
* *Lost
* *Stolen
*
* @see SoftLayer_User_Customer_External_Binding_Phone::disable
*/
@ApiMethod(instanceRequired = true)
public Boolean disable(String reason);
/**
* Enabling an external binding will activate the binding on your account and require you to authenticate with our trusted 3rd party 2 form factor vendor when logging into the SoftLayer customer portal.
*
* Please note that API access will be disabled for users that have an active external binding.
*
* @see SoftLayer_User_Customer_External_Binding_Phone::enable
*/
@ApiMethod(value = "enable", instanceRequired = true)
public Boolean enableForPhone();
/**
* This service returns key names of all available authentication modes. See [[SoftLayer_Container_User_Customer_External_Binding_Phone_Mode|authentication mode]] container for details.
*
* @see SoftLayer_User_Customer_External_Binding_Phone::getAllAuthenticationModes
*/
@ApiMethod(instanceRequired = true)
public List getAllAuthenticationModes();
/**
* This service returns key names of all available authentication modes. Refer to [[SoftLayer_User_Customer_External_Binding_Phone::getAllAuthenticationModes|getAllAuthenticationModes]] to retrieve authentication mode key names.
*
* @see SoftLayer_User_Customer_External_Binding_Phone::getAllAuthenticationPinModes
*/
@ApiMethod(instanceRequired = true)
public List getAllAuthenticationPinModes(String authenticationModeKeyName);
/**
* @see SoftLayer_User_Customer_External_Binding_Phone::getAuthenticationMode
*/
@ApiMethod(instanceRequired = true)
public Mode getAuthenticationMode();
/**
* @see SoftLayer_User_Customer_External_Binding_Phone::getObject
*/
@ApiMethod(value = "getObject", instanceRequired = true)
public Phone getObjectForPhone();
/**
* Some vendor's mobile app requires an activation code. Use this method to get an activation data.
*
* @see SoftLayer_User_Customer_External_Binding_Phone::getPhoneAppActivationCode
*/
@ApiMethod(instanceRequired = true)
public List getPhoneAppActivationCode();
/**
* @see SoftLayer_User_Customer_External_Binding_Phone::getPhoneData
*/
@ApiMethod(instanceRequired = true)
public List getPhoneData();
/**
* Initiates a phone validation requests and returns a unique token. Use [[SoftLayer_User_Customer_External_Binding_Phone::checkPhoneValidationResult|checkPhoneValidationResult]] to find the phone validation result.
*
* @see SoftLayer_User_Customer_External_Binding_Phone::requestPhoneValidation
*/
@ApiMethod(instanceRequired = true)
public String requestPhoneValidation(com.softlayer.api.service.container.user.data.Phone phoneData);
/**
* This service allow you to change your phone authentication mode. See [[SoftLayer_Container_User_Customer_External_Binding_Phone_Mode|authentication mode]] container for available modes.
*
* @see SoftLayer_User_Customer_External_Binding_Phone::updateAuthenticationMode
*/
@ApiMethod(instanceRequired = true)
public Boolean updateAuthenticationMode(Mode mode);
/**
* Phone external binding supports a primary and a backup phone number. You can use this method to update your phone number used for the phone authentication. You can provide an array of [[SoftLayer_Container_User_Data_Phone|User Phone]] objects. You have to mark one as the primary phone number by setting "phoneType" to "PRIMARY".
*
*
* *countryCode: Country code number for the phone number. Default: 1 (United States & Canada +1)
* *phone: Phone number that 2 Form Factor system will call or text for user authentication.
* The phone number format must match the format selected in the Country Code.
* *extension: Specify the extension that will be dialed after the call is answered. Digits, commas, *, and #
* are allowed. Commas can be used for a one second pause to navigate phone system menus.
* *phoneType: Specify the primary and backup phone number by setting this value to "PRIMARY" or "BACKUP".
* If omitted, it will be considered to be the primary phone number. If you are passing two Phone objects, you must specify the phone type of each phone number.
*
*
*
* @see SoftLayer_User_Customer_External_Binding_Phone::updatePhone
*/
@ApiMethod(instanceRequired = true)
public Boolean updatePhone(List phoneData);
/**
* The current external binding status. It can be "ACTIVE" or "BLOCKED".
*
* @see SoftLayer_User_Customer_External_Binding_Phone::getBindingStatus
*/
@ApiMethod(instanceRequired = true)
public String getBindingStatus();
/**
* @see SoftLayer_User_Customer_External_Binding_Phone::getPinLength
*/
@ApiMethod(instanceRequired = true)
public String getPinLength();
}
public static interface ServiceAsync extends Binding.ServiceAsync {
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Async version of {@link Service#checkPhoneValidationResult}
*/
public Future checkPhoneValidationResult(String token);
public Future> checkPhoneValidationResult(String token, ResponseHandler callback);
/**
* Async version of {@link Service#disable}
*/
public Future disable(String reason);
public Future> disable(String reason, ResponseHandler callback);
/**
* Async version of {@link Service#enableForPhone}
*/
public Future enableForPhone();
public Future> enableForPhone(ResponseHandler callback);
/**
* Async version of {@link Service#getAllAuthenticationModes}
*/
public Future> getAllAuthenticationModes();
public Future> getAllAuthenticationModes(ResponseHandler> callback);
/**
* Async version of {@link Service#getAllAuthenticationPinModes}
*/
public Future> getAllAuthenticationPinModes(String authenticationModeKeyName);
public Future> getAllAuthenticationPinModes(String authenticationModeKeyName, ResponseHandler> callback);
/**
* Async version of {@link Service#getAuthenticationMode}
*/
public Future getAuthenticationMode();
public Future> getAuthenticationMode(ResponseHandler callback);
/**
* Async version of {@link Service#getObjectForPhone}
*/
public Future getObjectForPhone();
public Future> getObjectForPhone(ResponseHandler callback);
/**
* Async version of {@link Service#getPhoneAppActivationCode}
*/
public Future> getPhoneAppActivationCode();
public Future> getPhoneAppActivationCode(ResponseHandler> callback);
/**
* Async version of {@link Service#getPhoneData}
*/
public Future> getPhoneData();
public Future> getPhoneData(ResponseHandler> callback);
/**
* Async version of {@link Service#requestPhoneValidation}
*/
public Future requestPhoneValidation(com.softlayer.api.service.container.user.data.Phone phoneData);
public Future> requestPhoneValidation(com.softlayer.api.service.container.user.data.Phone phoneData, ResponseHandler callback);
/**
* Async version of {@link Service#updateAuthenticationMode}
*/
public Future updateAuthenticationMode(Mode mode);
public Future> updateAuthenticationMode(Mode mode, ResponseHandler callback);
/**
* Async version of {@link Service#updatePhone}
*/
public Future updatePhone(List phoneData);
public Future> updatePhone(List phoneData, ResponseHandler callback);
/**
* Async version of {@link Service#getBindingStatus}
*/
public Future getBindingStatus();
/**
* Async callback version of {@link Service#getBindingStatus}
*/
public Future> getBindingStatus(ResponseHandler callback);
/**
* Async version of {@link Service#getPinLength}
*/
public Future getPinLength();
/**
* Async callback version of {@link Service#getPinLength}
*/
public Future> getPinLength(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.user.customer.external.Binding.Mask {
public Mask bindingStatus() {
withLocalProperty("bindingStatus");
return this;
}
public Mask pinLength() {
withLocalProperty("pinLength");
return this;
}
}
}