com.softlayer.api.service.user.customer.OpenIdConnect 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;
import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Account;
import com.softlayer.api.service.account.authentication.openidconnect.RegistrationInformation;
import com.softlayer.api.service.container.user.customer.PasswordSet;
import com.softlayer.api.service.container.user.customer.external.Binding;
import com.softlayer.api.service.container.user.customer.openidconnect.LoginAccountInfo;
import com.softlayer.api.service.container.user.customer.portal.Token;
import com.softlayer.api.service.user.Customer;
import java.util.List;
import java.util.concurrent.Future;
/**
* @see SoftLayer_User_Customer_OpenIdConnect
*/
@ApiType("SoftLayer_User_Customer_OpenIdConnect")
public class OpenIdConnect extends Customer {
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());
}
/**
* @see SoftLayer_User_Customer_OpenIdConnect
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_User_Customer_OpenIdConnect")
public static interface Service extends Customer.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Completes invitation process for an OpenIdConnect user created by Bluemix Unified User Console.
*
* @see SoftLayer_User_Customer_OpenIdConnect::activateOpenIdConnectUser
*/
@ApiMethod
public Void activateOpenIdConnectUser(String verificationCode, Customer userInfo, String iamId);
/**
* Add a description here
*
*
*
* @see SoftLayer_User_Customer_OpenIdConnect::checkPhoneFactorAuthenticationForPasswordSet
*/
@ApiMethod(instanceRequired = true)
public Boolean checkPhoneFactorAuthenticationForPasswordSet(PasswordSet passwordSet, Binding authenticationContainer);
/**
* @see SoftLayer_User_Customer_OpenIdConnect::completeInvitationAfterLogin
*/
@ApiMethod
public Void completeInvitationAfterLogin(String providerType, String accessToken, String emailRegistrationCode);
/**
* Create a new user in the SoftLayer customer portal. It is not possible to set up SLL enable flags during object creation. These flags are ignored during object creation. You will need to make a subsequent call to edit object in order to enable VPN access.
*
* An account's master user and sub-users who have the User Manage permission can add new users.
*
* Users are created with a default permission set. After adding a user it may be helpful to set their permissions and device access.
*
* secondaryPasswordTimeoutDays will be set to the system configured default value if the attribute is not provided or the attribute is not a valid value.
*
* Note, neither password nor vpnPassword parameters are required.
*
* Password When a new user is created, an email will be sent to the new user's email address with a link to a url that will allow the new user to create or change their password for the SoftLayer customer portal.
*
* If the password parameter is provided and is not null, then that value will be validated. If it is a valid password, then the user will be created with this password. This user will still receive a portal password email. It can be used within 24 hours to change their password, or it can be allowed to expire, and the password provided during user creation will remain as the user's password.
*
* If the password parameter is not provided or the value is null, the user must set their portal password using the link sent in email within 24 hours. If the user fails to set their password within 24 hours, then a non-master user can use the "Reset Password" link on the login page of the portal to request a new email. A master user can use the link to retrieve a phone number to call to assist in resetting their password.
*
* The password parameter is ignored for VPN_ONLY users or for IBMid authenticated users.
*
* vpnPassword If the vpnPassword is provided, then the user's vpnPassword will be set to the provided password. When creating a vpn only user, the vpnPassword MUST be supplied. If the vpnPassword is not provided, then the user will need to use the portal to edit their profile and set the vpnPassword.
*
* IBMid considerations When a SoftLayer account is linked to a Platform Services (PaaS, formerly Bluemix) account, AND the trait on the SoftLayer Account indicating IBMid authentication is set, then SoftLayer will delegate the creation of the user to PaaS. The Platform Services "invite user" API call is asynchronous, and so no user object can be returned from this API call. In this specific case, this API will throw a SoftLayer_Exception_User_Customer_DelegateIamIdInvitationToPaas exception, with text indicating that the call was at least accepted by Platform Services. The Platform Services API is the preferred API for creating users based on IBMid in a linked account pair. If you have automation using this API that depends on getting a synchronous response with a user object with an id, you should contact SoftLayer Support to have the "IBMid authentication" trait set to 0 on this account. In that case, a normal SoftLayer user will be created (no IBMid association set up) and the createObject call will return synchronously as before.
*
* @see SoftLayer_User_Customer_OpenIdConnect::createObject
*/
@ApiMethod
public OpenIdConnect createObject(OpenIdConnect templateObject, String password, String vpnPassword);
/**
* @see SoftLayer_User_Customer_OpenIdConnect::createOpenIdConnectUserAndCompleteInvitation
*/
@ApiMethod
public String createOpenIdConnectUserAndCompleteInvitation(String providerType, Customer user, String password, String registrationCode);
/**
* Declines an invitation to link an OpenIdConnect identity to a SoftLayer (Atlas) identity and account. Note that this uses a registration code that is likely a one-time-use-only token, so if an invitation has already been processed (accepted or previously declined) it will not be possible to process it a second time.
*
* @see SoftLayer_User_Customer_OpenIdConnect::declineInvitation
*/
@ApiMethod
public Void declineInvitation(String providerType, String registrationCode);
/**
* This API gets the default account for the OpenIdConnect identity that is linked to the current SoftLayer user identity. If there is no default present, the API returns null, except in the special case where we find one active user linked to the IAMid. In that case, we will set the link from the IAMid to that user as default, and return the account of which that user is a member. Invoke this only on IAMid-authenticated users.
*
* @see SoftLayer_User_Customer_OpenIdConnect::getDefaultAccount
*/
@ApiMethod(instanceRequired = true)
public Account getDefaultAccount(String providerType);
/**
* Validates a supplied OpenIdConnect access token to the SoftLayer customer portal and returns the default account name and id for the active user. An exception will be thrown if no matching customer is found.
*
* @see SoftLayer_User_Customer_OpenIdConnect::getLoginAccountInfoOpenIdConnect
*/
@ApiMethod
public LoginAccountInfo getLoginAccountInfoOpenIdConnect(String providerType, String accessToken);
/**
* An OpenIdConnect identity, for example an IAMid, can be linked or mapped to one or more individual SoftLayer users, but no more than one SoftLayer user per account. This effectively links the OpenIdConnect identity to those accounts. This API returns a list of all active accounts for which there is a link between the OpenIdConnect identity and a SoftLayer user. Invoke this only on IAMid-authenticated users.
*
* @see SoftLayer_User_Customer_OpenIdConnect::getMappedAccounts
*/
@ApiMethod(instanceRequired = true)
public List getMappedAccounts(String providerType);
/**
* @see SoftLayer_User_Customer_OpenIdConnect::getObject
*/
@ApiMethod(value = "getObject", instanceRequired = true)
public OpenIdConnect getObjectForOpenIdConnect();
/**
* @see SoftLayer_User_Customer_OpenIdConnect::getOpenIdRegistrationInfoFromCode
*/
@ApiMethod
public RegistrationInformation getOpenIdRegistrationInfoFromCode(String providerType, String registrationCode);
/**
* Attempt to authenticate a supplied OpenIdConnect access token to the SoftLayer customer portal. If authentication is successful then the API returns a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication.
*
* @see SoftLayer_User_Customer_OpenIdConnect::getPortalLoginTokenOpenIdConnect
*/
@ApiMethod
public Token getPortalLoginTokenOpenIdConnect(String providerType, String accessToken, Long accountId, Long securityQuestionId, String securityQuestionAnswer);
/**
* Retrieve the authentication requirements for an outstanding password set/reset request. The requirements returned in the same SoftLayer_Container_User_Customer_PasswordSet container which is provided as a parameter into this request. The SoftLayer_Container_User_Customer_PasswordSet::authenticationMethods array will contain an entry for each authentication method required for the user. See SoftLayer_Container_User_Customer_PasswordSet for more details.
*
* If the user has required authentication methods, then authentication information will be supplied to the SoftLayer_User_Customer::processPasswordSetRequest method within this same SoftLayer_Container_User_Customer_PasswordSet container. All existing information in the container must continue to exist in the container to complete the password set/reset process.
*
* @see SoftLayer_User_Customer_OpenIdConnect::getRequirementsForPasswordSet
*/
@ApiMethod(value = "getRequirementsForPasswordSet", instanceRequired = true)
public PasswordSet getRequirementsForPasswordSetForOpenIdConnect(PasswordSet passwordSet);
/**
* Returns an IMS User Object from the provided OpenIdConnect User ID or IBMid Unique Identifier for the Account of the active user. Enforces the User Management permissions for the Active User. An exception will be thrown if no matching IMS User is found. NOTE that providing IBMid Unique Identifier is optional, but it will be preferred over OpenIdConnect User ID if provided.
*
* @see SoftLayer_User_Customer_OpenIdConnect::getUserForUnifiedInvitation
*/
@ApiMethod
public OpenIdConnect getUserForUnifiedInvitation(String openIdConnectUserId, String uniqueIdentifier, String searchInvitationsNotLinksFlag);
/**
* Retrieve a user id using a password token provided to the user in an email generated by the SoftLayer_User_Customer::initiatePortalPasswordChange request. Password recovery keys are valid for 24 hours after they're generated.
*
* When a new user is created or when a user has requested a password change using initiatePortalPasswordChange, they will have received an email that contains a url with a token. That token is used as the parameter for getUserIdForPasswordSet. Once the user id is known, then the SoftLayer_User_Customer object can be retrieved which is necessary to complete the process to set or reset a user's password.
*
* @see SoftLayer_User_Customer_OpenIdConnect::getUserIdForPasswordSet
*/
@ApiMethod
public Long getUserIdForPasswordSet(String key);
/**
* Sends password change email to the user containing url that allows the user the change their password. This is the first step when a user wishes to change their password. The url that is generated contains a one-time use token that is valid for only 24-hours.
*
* If this is a new master user who has never logged into the portal, then password reset will be initiated. Once a master user has logged into the portal, they must setup their security questions prior to logging out because master users are required to answer a security question during the password reset process. Should a master user not have security questions defined and not remember their password in order to define the security questions, then they will need to contact support at live chat or Revenue Services for assistance.
*
* Due to security reasons, the number of reset requests per username are limited within a undisclosed timeframe.
*
* @see SoftLayer_User_Customer_OpenIdConnect::initiatePortalPasswordChange
*/
@ApiMethod
public Boolean initiatePortalPasswordChange(String username);
/**
* A Brand Agent that has permissions to Add Customer Accounts will be able to request the password email be sent to the Master User of a Customer Account created by the same Brand as the agent making the request. Due to security reasons, the number of reset requests are limited within an undisclosed timeframe.
*
* @see SoftLayer_User_Customer_OpenIdConnect::initiatePortalPasswordChangeByBrandAgent
*/
@ApiMethod(instanceRequired = true)
public Boolean initiatePortalPasswordChangeByBrandAgent(String username);
/**
* Determine if a string is the given user's login password to the SoftLayer customer portal.
*
* @see SoftLayer_User_Customer_OpenIdConnect::isValidPortalPassword
*/
@ApiMethod(instanceRequired = true)
public Boolean isValidPortalPassword(String password);
/**
* Set the password for a user who has an outstanding password request. A user with an outstanding password request will have an unused and unexpired password key. The password key is part of the url provided to the user in the email sent to the user with information on how to set their password. The email was generated by the SoftLayer_User_Customer::initiatePortalPasswordRequest request. Password recovery keys are valid for 24 hours after they're generated.
*
* If the user has required authentication methods as specified by in the SoftLayer_Container_User_Customer_PasswordSet container returned from the SoftLayer_User_Customer::getRequirementsForPasswordSet request, then additional requests must be made to processPasswordSetRequest to authenticate the user before changing the password. First, if the user has security questions set on their profile, they will be required to answer one of their questions correctly. Next, if the user has Verisign, Google Authentication, or Phone Factor on their account, they must authenticate according to the two-factor provider. All of this authentication is done using the SoftLayer_Container_User_Customer_PasswordSet container. If the user has Phone Factor authentication, additional requests to SoftLayer_User_Customer::checkPhoneFactorAuthenticationForPasswordSet is required until a response other than Awaiting Response is received.
*
* User portal passwords must match the following restrictions. Portal passwords must...
* * ...be over eight characters long.
* * ...be under twenty characters long.
* * ...contain at least one uppercase letter
* * ...contain at least one lowercase letter
* * ...contain at least one number
* * ...contain one of the special characters _ - | @ . , ? / ! ~ # $ % ^ & * ( ) { } [ ] \ + =
* * ...not match your username
*
* @see SoftLayer_User_Customer_OpenIdConnect::processPasswordSetRequest
*/
@ApiMethod(instanceRequired = true)
public Boolean processPasswordSetRequest(PasswordSet passwordSet, Binding authenticationContainer);
/**
* @see SoftLayer_User_Customer_OpenIdConnect::selfPasswordChange
*/
@ApiMethod(instanceRequired = true)
public Void selfPasswordChange(String currentPassword, String newPassword);
/**
* An OpenIdConnect identity, for example an IAMid, can be linked or mapped to one or more individual SoftLayer users, but no more than one per account. If an OpenIdConnect identity is mapped to multiple accounts in this manner, one such account should be identified as the default account for that identity. Invoke this only on IBMid-authenticated users.
*
* @see SoftLayer_User_Customer_OpenIdConnect::setDefaultAccount
*/
@ApiMethod(instanceRequired = true)
public Account setDefaultAccount(String providerType, Long accountId);
}
public static interface ServiceAsync extends Customer.ServiceAsync {
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Async version of {@link Service#activateOpenIdConnectUser}
*/
public Future activateOpenIdConnectUser(String verificationCode, Customer userInfo, String iamId);
public Future> activateOpenIdConnectUser(String verificationCode, Customer userInfo, String iamId, ResponseHandler callback);
/**
* Async version of {@link Service#checkPhoneFactorAuthenticationForPasswordSet}
*/
public Future checkPhoneFactorAuthenticationForPasswordSet(PasswordSet passwordSet, Binding authenticationContainer);
public Future> checkPhoneFactorAuthenticationForPasswordSet(PasswordSet passwordSet, Binding authenticationContainer, ResponseHandler callback);
/**
* Async version of {@link Service#completeInvitationAfterLogin}
*/
public Future completeInvitationAfterLogin(String providerType, String accessToken, String emailRegistrationCode);
public Future> completeInvitationAfterLogin(String providerType, String accessToken, String emailRegistrationCode, ResponseHandler callback);
/**
* Async version of {@link Service#createObject}
*/
public Future createObject(OpenIdConnect templateObject, String password, String vpnPassword);
public Future> createObject(OpenIdConnect templateObject, String password, String vpnPassword, ResponseHandler callback);
/**
* Async version of {@link Service#createOpenIdConnectUserAndCompleteInvitation}
*/
public Future createOpenIdConnectUserAndCompleteInvitation(String providerType, Customer user, String password, String registrationCode);
public Future> createOpenIdConnectUserAndCompleteInvitation(String providerType, Customer user, String password, String registrationCode, ResponseHandler callback);
/**
* Async version of {@link Service#declineInvitation}
*/
public Future declineInvitation(String providerType, String registrationCode);
public Future> declineInvitation(String providerType, String registrationCode, ResponseHandler callback);
/**
* Async version of {@link Service#getDefaultAccount}
*/
public Future getDefaultAccount(String providerType);
public Future> getDefaultAccount(String providerType, ResponseHandler callback);
/**
* Async version of {@link Service#getLoginAccountInfoOpenIdConnect}
*/
public Future getLoginAccountInfoOpenIdConnect(String providerType, String accessToken);
public Future> getLoginAccountInfoOpenIdConnect(String providerType, String accessToken, ResponseHandler callback);
/**
* Async version of {@link Service#getMappedAccounts}
*/
public Future> getMappedAccounts(String providerType);
public Future> getMappedAccounts(String providerType, ResponseHandler> callback);
/**
* Async version of {@link Service#getObjectForOpenIdConnect}
*/
public Future getObjectForOpenIdConnect();
public Future> getObjectForOpenIdConnect(ResponseHandler callback);
/**
* Async version of {@link Service#getOpenIdRegistrationInfoFromCode}
*/
public Future getOpenIdRegistrationInfoFromCode(String providerType, String registrationCode);
public Future> getOpenIdRegistrationInfoFromCode(String providerType, String registrationCode, ResponseHandler callback);
/**
* Async version of {@link Service#getPortalLoginTokenOpenIdConnect}
*/
public Future getPortalLoginTokenOpenIdConnect(String providerType, String accessToken, Long accountId, Long securityQuestionId, String securityQuestionAnswer);
public Future> getPortalLoginTokenOpenIdConnect(String providerType, String accessToken, Long accountId, Long securityQuestionId, String securityQuestionAnswer, ResponseHandler callback);
/**
* Async version of {@link Service#getRequirementsForPasswordSetForOpenIdConnect}
*/
public Future getRequirementsForPasswordSetForOpenIdConnect(PasswordSet passwordSet);
public Future> getRequirementsForPasswordSetForOpenIdConnect(PasswordSet passwordSet, ResponseHandler callback);
/**
* Async version of {@link Service#getUserForUnifiedInvitation}
*/
public Future getUserForUnifiedInvitation(String openIdConnectUserId, String uniqueIdentifier, String searchInvitationsNotLinksFlag);
public Future> getUserForUnifiedInvitation(String openIdConnectUserId, String uniqueIdentifier, String searchInvitationsNotLinksFlag, ResponseHandler callback);
/**
* Async version of {@link Service#getUserIdForPasswordSet}
*/
public Future getUserIdForPasswordSet(String key);
public Future> getUserIdForPasswordSet(String key, ResponseHandler callback);
/**
* Async version of {@link Service#initiatePortalPasswordChange}
*/
public Future initiatePortalPasswordChange(String username);
public Future> initiatePortalPasswordChange(String username, ResponseHandler callback);
/**
* Async version of {@link Service#initiatePortalPasswordChangeByBrandAgent}
*/
public Future initiatePortalPasswordChangeByBrandAgent(String username);
public Future> initiatePortalPasswordChangeByBrandAgent(String username, ResponseHandler callback);
/**
* Async version of {@link Service#isValidPortalPassword}
*/
public Future isValidPortalPassword(String password);
public Future> isValidPortalPassword(String password, ResponseHandler callback);
/**
* Async version of {@link Service#processPasswordSetRequest}
*/
public Future processPasswordSetRequest(PasswordSet passwordSet, Binding authenticationContainer);
public Future> processPasswordSetRequest(PasswordSet passwordSet, Binding authenticationContainer, ResponseHandler callback);
/**
* Async version of {@link Service#selfPasswordChange}
*/
public Future selfPasswordChange(String currentPassword, String newPassword);
public Future> selfPasswordChange(String currentPassword, String newPassword, ResponseHandler callback);
/**
* Async version of {@link Service#setDefaultAccount}
*/
public Future setDefaultAccount(String providerType, Long accountId);
public Future> setDefaultAccount(String providerType, Long accountId, ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.user.Customer.Mask {
}
}