Java源码示例:org.wso2.carbon.identity.mgt.stub.beans.VerificationBean
示例1
public VerificationBean verifyChallengeQuestion(String userId, String userKey, String question,
String answer) throws AxisFault {
try {
UserChallengesDTO dto = new UserChallengesDTO();
dto.setQuestion(question);
dto.setAnswer(answer);
return stub.verifyChallengeQuestion(userId, userKey, new UserChallengesDTO[]{dto});
} catch (Exception e) {
handleException(e.getMessage(), e);
}
return null;
}
示例2
public VerificationBean confirmLink(String confirmationKey) throws AxisFault {
try {
return stub.confirmUserAccount(confirmationKey);
} catch (Exception e) {
handleException(e.getMessage(), e);
}
return null;
}
示例3
public boolean updateCredential(String userId, String userKey, String password,
CaptchaInfoBean captchaInfoBean) throws AxisFault {
try {
VerificationBean bean = stub.updateCredential(userId, userKey, password, captchaInfoBean);
return bean.getVerified();
} catch (Exception e) {
handleException(e.getMessage(), e);
}
return false;
}
示例4
public VerificationBean verifyUser(String username, CaptchaInfoBean captcha) throws AxisFault {
try {
return stub.verifyUser(username, captcha);
} catch (Exception e) {
handleException(e.getMessage(), e);
}
return null;
}
示例5
/**
* Returns the error to be viewed for end user.
*
* @param errorMsgSummary required error message to be viewed
* @param optionalErrorMsg optional content to be viewed
* @param verificationBean info recovery confirmation bean
* @return error message to be viewed
*/
public static String getPrintableError(String errorMsgSummary, String optionalErrorMsg, VerificationBean
verificationBean) {
StringBuilder errorMsg = new StringBuilder(errorMsgSummary);
if (verificationBean != null && StringUtils.isNotBlank(verificationBean.getError())) {
String[] error = verificationBean.getError().split(" ", 2);
errorMsg.append(" ").append(error[1]);
} else if (StringUtils.isNotBlank(optionalErrorMsg)) {
errorMsg.append(" ").append(optionalErrorMsg);
}
return errorMsg.toString();
}
示例6
public VerificationBean verifyChallengeQuestion(String userId, String userKey, String question,
String answer) throws AxisFault {
try {
UserChallengesDTO dto = new UserChallengesDTO();
dto.setQuestion(question);
dto.setAnswer(answer);
return stub.verifyChallengeQuestion(userId, userKey, new UserChallengesDTO[]{dto});
} catch (Exception e) {
handleException(e.getMessage(), e);
}
return null;
}
示例7
public VerificationBean confirmLink(String confirmationKey) throws AxisFault {
try {
return stub.confirmUserAccount(confirmationKey);
} catch (Exception e) {
handleException(e.getMessage(), e);
}
return null;
}
示例8
public boolean updateCredential(String userId, String userKey, String password,
CaptchaInfoBean captchaInfoBean) throws AxisFault {
try {
VerificationBean bean = stub.updateCredential(userId, userKey, password, captchaInfoBean);
return bean.getVerified();
} catch (Exception e) {
handleException(e.getMessage(), e);
}
return false;
}
示例9
public VerificationBean verifyUser(String username, CaptchaInfoBean captcha) throws AxisFault {
try {
return stub.verifyUser(username, captcha);
} catch (Exception e) {
handleException(e.getMessage(), e);
}
return null;
}
示例10
/**
* Sends the password recovery notification.
*
* @param username username of the user
* @param key confirmation code
* @return an instance of VerificationBean which denotes the status
* @throws RemoteException
* @throws UserInformationRecoveryServiceIdentityMgtServiceExceptionException
*/
public VerificationBean sendRecoveryNotification(String username, String key)
throws RemoteException, UserInformationRecoveryServiceIdentityMgtServiceExceptionException {
return stub.sendRecoveryNotification(username, key,
IdentityManagementEndpointConstants.PasswordRecoveryOptions.EMAIL);
}
示例11
/**
* Verifies the password recovery notification confirmation.
*
* @param username username of the user
* @param code confirmation code
* @param captcha an instance of CaptchaInfoBean
* @return an instance of VerificationBean which denotes the status
* @throws RemoteException
* @throws UserInformationRecoveryServiceIdentityMgtServiceExceptionException
*/
public VerificationBean verifyConfirmationCode(String username, String code,
CaptchaInfoBean captcha)
throws RemoteException, UserInformationRecoveryServiceIdentityMgtServiceExceptionException {
return stub.verifyConfirmationCode(username, code, captcha);
}
示例12
/**
* Resets the password.
*
* @param username username of the user
* @param confirmationCode confirmation code
* @param newPassword new password
* @return an instance of VerificationBean which denotes the status
* @throws RemoteException
* @throws UserInformationRecoveryServiceIdentityMgtServiceExceptionException
*/
public VerificationBean resetPassword(String username, String confirmationCode,
String newPassword)
throws RemoteException, UserInformationRecoveryServiceIdentityMgtServiceExceptionException {
return stub.updatePassword(username, confirmationCode, newPassword);
}
示例13
/**
* Verifies user answers for the user challenge question set.
*
* @param username username of the user
* @param confirmationCode confirmation code
* @param userChallengesDTOs an array of UserChallengesDTO instances which holds the respective question and answer
* @return an instance of VerificationBean which denotes the status
* @throws RemoteException
* @throws UserInformationRecoveryServiceIdentityMgtServiceExceptionException
*/
public VerificationBean verifyUserChallengeAnswers(String username, String confirmationCode,
UserChallengesDTO[] userChallengesDTOs)
throws RemoteException, UserInformationRecoveryServiceIdentityMgtServiceExceptionException {
return stub.verifyUserChallengeAnswers(username, confirmationCode, userChallengesDTOs);
}
示例14
/**
* Registers the user.
*
* @param userName username
* @param password password
* @param claims claims of the user
* @param profileName profile name
* @param tenantDomain tenant domain
* @return an instance of VerificationBean which denotes the status
* @throws RemoteException
* @throws UserInformationRecoveryServiceIdentityMgtServiceExceptionException
*/
public VerificationBean registerUser(String userName, String password,
UserIdentityClaimDTO[] claims, String profileName,
String tenantDomain)
throws RemoteException, UserInformationRecoveryServiceIdentityMgtServiceExceptionException {
return stub.registerUser(userName, password, claims, profileName, tenantDomain);
}
示例15
/**
* Confirms self registration notification.
*
* @param userName username of the user
* @param code confirmation code
* @param captcha an instance of CaptchaInfoBean
* @param tenantDomain tenant domain
* @return an instance of VerificationBean which denotes the status
* @throws RemoteException
* @throws UserInformationRecoveryServiceIdentityMgtServiceExceptionException
*/
public VerificationBean confirmUserSelfRegistration
(String userName, String code, CaptchaInfoBean captcha, String tenantDomain)
throws RemoteException, UserInformationRecoveryServiceIdentityMgtServiceExceptionException {
return stub.confirmUserSelfRegistration(userName, code, captcha, tenantDomain);
}
示例16
/**
* Verifies the captcha answer.
*
* @param username username of the user
* @param captcha an instance of CaptchaInfoBean
* @return an instance of VerificationBean which denotes the status
* @throws RemoteException
* @throws UserInformationRecoveryServiceIdentityMgtServiceExceptionException
*/
public VerificationBean verifyUser(String username, CaptchaInfoBean captcha)
throws RemoteException, UserInformationRecoveryServiceIdentityMgtServiceExceptionException {
return stub.verifyUser(username, captcha);
}
示例17
/**
* Verifies the provided answer for the respective question.
*
* @param username username of the user
* @param code confirmation code
* @param id question id
* @param answer user answer
* @return an instance of VerificationBean which denotes the status
* @throws RemoteException
* @throws UserInformationRecoveryServiceIdentityMgtServiceExceptionException
*/
public VerificationBean verifyUserChallengeAnswer(String username, String code, String id, String answer)
throws RemoteException, UserInformationRecoveryServiceIdentityMgtServiceExceptionException {
return stub.verifyUserChallengeAnswer(username, code, id, answer);
}
示例18
/**
* Verifies the captcha answer and recovers the username via the provided claims
*
* @param claims claims of the user
* @param captcha an instance of CaptchaInfoBean
* @param tenantDomain tenant domain
* @return an instance of VerificationBean which denotes the status
* @throws RemoteException
* @throws UserInformationRecoveryServiceIdentityMgtServiceExceptionException
*/
public VerificationBean verifyAccount(UserIdentityClaimDTO[] claims, CaptchaInfoBean captcha,
String tenantDomain)
throws RemoteException, UserInformationRecoveryServiceIdentityMgtServiceExceptionException {
return stub.verifyAccount(claims, captcha, tenantDomain);
}