use of org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue in project product-is by wso2.
the class OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase method getClaimValue.
private ClaimValue getClaimValue(String claimURL, String claimVal) {
ClaimValue claim = new ClaimValue();
claim.setClaimURI(claimURL);
claim.setValue(claimVal);
return claim;
}
use of org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue in project product-is by wso2.
the class OAuth2ServiceAuthCodeGrantOpenIdTestCase method getUserClaims.
protected ClaimValue[] getUserClaims() {
ClaimValue[] claimValues = new ClaimValue[1];
ClaimValue email = new ClaimValue();
email.setClaimURI(emailClaimURI);
email.setValue(USER_EMAIL);
claimValues[0] = email;
return claimValues;
}
use of org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue in project product-is by wso2.
the class OAuth2ServiceResourceOwnerTestCase method createLockedUser.
private void createLockedUser(String username, String password) {
log.info("Creating User " + username);
ClaimValue[] claimValues = new ClaimValue[1];
// Need to add this claim and have the value true in order to test the fix
ClaimValue accountLockClaim = new ClaimValue();
accountLockClaim.setClaimURI(ACCOUNT_LOCK_CLAIM_URI);
accountLockClaim.setValue(Boolean.TRUE.toString());
claimValues[0] = accountLockClaim;
try {
remoteUSMServiceClient.addUser(username, password, null, claimValues, null, false);
} catch (Exception e) {
Assert.fail("Error while creating the user", e);
}
}
use of org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue in project product-is by wso2.
the class OpenIDSSOTestCase method createUser.
@BeforeMethod
public void createUser() {
OpenIDUtils.User user = config.getUser();
log.info("Creating User " + user.getUsername());
ClaimValue[] claimValues = new ClaimValue[2];
ClaimValue firstName = new ClaimValue();
firstName.setClaimURI(firstNameClaimURI);
firstName.setValue(user.getUsername());
claimValues[1] = firstName;
ClaimValue email = new ClaimValue();
email.setClaimURI(emailClaimURI);
email.setValue(user.getEmail());
claimValues[0] = email;
try {
// creating the user
remoteUSMServiceClient.addUser(user.getUsername(), user.getPassword(), new String[] { user.getRole() }, claimValues, profileName, true);
} catch (Exception e) {
Assert.fail("Error while creating the user", e);
}
}
use of org.wso2.carbon.user.mgt.stub.types.carbon.ClaimValue in project product-is by wso2.
the class OpenIDUserProfileTestCase method createUser.
public void createUser() throws Exception {
ClaimValue email = new ClaimValue();
email.setClaimURI(emailClaimURI);
email.setValue(emailClaimValue);
claimValues[0] = email;
ClaimValue firstName = new ClaimValue();
firstName.setClaimURI(firstNameClaimURI);
firstName.setValue(firstNameClaimValue);
claimValues[1] = firstName;
ClaimValue lastName = new ClaimValue();
lastName.setClaimURI(lastNameClaimURI);
lastName.setValue(lastNameClaimValue);
claimValues[2] = lastName;
ClaimValue country = new ClaimValue();
country.setClaimURI(countryClaimURI);
country.setValue(countryClaimValue);
claimValues[3] = country;
// creating the user
RemoteUserStoreManagerServiceClient remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
remoteUSMServiceClient.addUser(userName, password, roles, claimValues, profileName, true);
}
Aggregations