All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softlayer.api.service.user.customer.OpenIdConnect Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
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 com.softlayer.api.service.user.customer.security.Answer;
import com.softlayer.api.service.user.security.Question;
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);

        /**
         * 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. createObject() creates a user's portal record and adds them into the SoftLayer community forums. It is not possible to set up SLL or PPTP 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. createObject() creates users with a default permission set. After adding a user it may be helpful to set their permissions and hardware access.
*
* 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.
*
* * * @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 IBMid. In that case, we will set the link from the IBMid to that user as default, and return the account of which that user is a member. Invoke this only on IBMid-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 IBMid, 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 the accounts for which there is a link between the OpenIdConnect identity and a SoftLayer user. Invoke this only on IBMid-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 password key provided to the user in an email generated by the [[SoftLayer_User_Customer::newUserPassword|newUserPassword]]. Password recovery keys are valid for 24 hours after they're generated. * * @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 ibmIdUniqueIdentifier); /** * This method is deprecated. Please see documentation for initiatePortalPasswordChange Retrieve a user object using a password recovery key received in an email generated by the [[SoftLayer_User_Customer::lostPassword|lostPassword]] method. The SoftLayer customer portal uses getUserFromLostPasswordRequest() to retrieve user security questions. Password recovery keys are valid for 24 hours after they're generated. * * @see SoftLayer_User_Customer_OpenIdConnect::getUserFromLostPasswordRequest */ @ApiMethod public List getUserFromLostPasswordRequest(String key); /** * Retrieve a user object using a password token. 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. * * @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 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); /** * This method is deprecated. Please see documentation for initiatePortalPasswordChange SoftLayer provides a way for users of it's customer portal to recover lost passwords. The lostPassword() method is the first step in this process. Given a valid username and email address, the SoftLayer API will email the address provided with a URL to visit to begin the password recovery process. The last part of this URL is a hash key that's used as an identifier throughout this process. Use this hash key in the [[SoftLayer_User_Customer::setPasswordFromLostPasswordRequest|setPasswordFromLostPasswordRequest]] method to reset a user's password. Password recovery hash keys are valid for 24 hours after they're generated. * * @see SoftLayer_User_Customer_OpenIdConnect::lostPassword */ @ApiMethod public Boolean lostPassword(String username, String email); /** * 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|initiatePortalPasswordRequest]] method. Password recovery keys are valid for 24 hours after they're generated.
*
* 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
* * ...not match your forum password * * @see SoftLayer_User_Customer_OpenIdConnect::processPasswordSetRequest */ @ApiMethod(instanceRequired = true) public Boolean processPasswordSetRequest(PasswordSet passwordSet, Binding authenticationContainer); /** * This method is deprecated. Please see documentation for initiatePortalPasswordChange Attempt to authenticate a username and password to the SoftLayer customer portal and reset there password. If authentication and password reset is successful then the API returns true. * * @see SoftLayer_User_Customer_OpenIdConnect::resetExpiredPassword */ @ApiMethod public Boolean resetExpiredPassword(String username, String password, String newPassword, Long securityQuestionId, String securityQuestionAnswer); /** * An OpenIdConnect identity, for example an IBMid, 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); /** * Set a user's password via the lost password recovery system, using a password recovery key received in an email generated by the [[SoftLayer_User_Customer::lostPassword|lostPassword]] method. Password recovery keys are valid for 24 hours after they're generated.
*
* 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
* * ...not match your forum password * * @see SoftLayer_User_Customer_OpenIdConnect::setPasswordFromLostPasswordRequest */ @ApiMethod public Boolean setPasswordFromLostPasswordRequest(String key, String password, List securityAnswers); /** * This method is deprecated. Please see documentation for initiatePortalPasswordChange Update a user's password on the SoftLayer customer portal. As with forum passwords, 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
* * ...not match your forum password
* Finally, users can only update their own password. An account's master user can update any of their account users' passwords. * * @see SoftLayer_User_Customer_OpenIdConnect::updatePassword */ @ApiMethod(instanceRequired = true) public Boolean updatePassword(String password); } 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); public Future activateOpenIdConnectUser(String verificationCode, Customer userInfo, 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 ibmIdUniqueIdentifier); public Future getUserForUnifiedInvitation(String openIdConnectUserId, String ibmIdUniqueIdentifier, ResponseHandler callback); /** * Async version of {@link Service#getUserFromLostPasswordRequest} */ public Future> getUserFromLostPasswordRequest(String key); public Future getUserFromLostPasswordRequest(String key, 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#lostPassword} */ public Future lostPassword(String username, String email); public Future lostPassword(String username, String email, 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#resetExpiredPassword} */ public Future resetExpiredPassword(String username, String password, String newPassword, Long securityQuestionId, String securityQuestionAnswer); public Future resetExpiredPassword(String username, String password, String newPassword, Long securityQuestionId, String securityQuestionAnswer, ResponseHandler callback); /** * Async version of {@link Service#setDefaultAccount} */ public Future setDefaultAccount(String providerType, Long accountId); public Future setDefaultAccount(String providerType, Long accountId, ResponseHandler callback); /** * Async version of {@link Service#setPasswordFromLostPasswordRequest} */ public Future setPasswordFromLostPasswordRequest(String key, String password, List securityAnswers); public Future setPasswordFromLostPasswordRequest(String key, String password, List securityAnswers, ResponseHandler callback); /** * Async version of {@link Service#updatePassword} */ public Future updatePassword(String password); public Future updatePassword(String password, ResponseHandler callback); } public static class Mask extends com.softlayer.api.service.user.Customer.Mask { } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy