use of org.wso2.identity.scenarios.commons.clients.UserManagementClient in project product-is by wso2.
the class SelfSignUpConsentTest method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
secondaryTenantDomain = isServer.getTenantList().get(1);
tenantAdminUserName = ADMIN + "@" + secondaryTenantDomain;
this.logManager = new AuthenticatorClient(backendURL);
String tenantCookie = this.logManager.login(ADMIN + "@" + secondaryTenantDomain, ADMIN, isServer.getInstance().getHosts().get("default"));
superTenantIDPMgtClient = new IdentityProviderMgtServiceClient(sessionCookie, backendURL);
tenantIDPMgtClient = new IdentityProviderMgtServiceClient(tenantCookie, backendURL);
tenantUserMgtClient = new UserManagementClient(backendURL, tenantCookie);
isServerBackendUrl = isServer.getContextUrls().getWebAppURLHttps();
consentEndpoint = isServerBackendUrl + "/t/" + secondaryTenantDomain + CONSNT_ENDPOINT_SUFFIX;
selfRegisterDoEndpoint = isServerBackendUrl + "/accountrecoveryendpoint/register.do";
signupDoEndpoint = isServerBackendUrl + "/accountrecoveryendpoint/signup.do";
selfRegistrationMeEndpoint = isServerBackendUrl + "/t/" + secondaryTenantDomain + USER_RECOVERY_ME_ENDPOINT;
superTenantResidentIDP = superTenantIDPMgtClient.getResidentIdP();
tenantResidentIDP = tenantIDPMgtClient.getResidentIdP();
}
use of org.wso2.identity.scenarios.commons.clients.UserManagementClient in project product-is by wso2.
the class OAuth2ServiceJWTGrantTestCase method setup.
@BeforeClass
public void setup() throws Exception {
super.init(TestUserMode.SUPER_TENANT_ADMIN);
changeISConfiguration("jwt_token_issuer_enabled.toml");
super.init(TestUserMode.SUPER_TENANT_ADMIN);
OAuthConsumerAppDTO appDto = createApplication(createApplicationWithJWTGrantType());
consumerKey = appDto.getOauthConsumerKey();
consumerSecret = appDto.getOauthConsumerSecret();
userManagementClient = new UserManagementClient(backendURL, sessionCookie);
oauthAdminClient = new OauthAdminClient(backendURL, sessionCookie);
userProfileMgtServiceClient = new UserProfileMgtServiceClient(backendURL, sessionCookie);
identityProviderMgtServiceClient = new IdentityProviderMgtServiceClient(sessionCookie, backendURL);
addNewUserWithClaims();
claimMetadataManagementServiceClient = new ClaimMetadataManagementServiceClient(backendURL, sessionCookie);
changeCountryOIDDialect();
ExternalClaimDTO externalClaimDTO = new ExternalClaimDTO();
externalClaimDTO.setExternalClaimDialectURI(OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase.OIDC_CLAIM_DIALECT);
externalClaimDTO.setMappedLocalClaimURI(COUNTRY_LOCAL_CLAIM_URI);
externalClaimDTO.setExternalClaimURI(COUNTRY_NEW_OIDC_CLAIM);
claimMetadataManagementServiceClient.addExternalClaim(externalClaimDTO);
String[] openidValue = new String[1];
openidValue[0] = COUNTRY_NEW_OIDC_CLAIM;
oauthAdminClient.updateScope(openIdScope, openidValue, null);
}
use of org.wso2.identity.scenarios.commons.clients.UserManagementClient in project product-is by wso2.
the class UserSessionTest method testInitData.
@BeforeClass(alwaysRun = true)
public void testInitData() throws Exception {
appMgtclient = new ApplicationManagementServiceClient(sessionCookie, backendURL, null);
userMgtClient = new UserManagementClient(backendURL, sessionCookie);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
isURL = backendURL.substring(0, backendURL.indexOf("services/"));
serviceProviderTravelocity = createServiceProvider(ISSUER_TRAVELOCITY_COM, SERVICE_PROVIDER_NAME_TRAVELOCITY);
serviceProviderAvis = createServiceProvider(ISSUER_AVIS_COM, SERVICE_PROVIDER_NAME_AVIS);
createUsersForTesting();
createSessionsForTesting();
}
use of org.wso2.identity.scenarios.commons.clients.UserManagementClient in project product-is by wso2.
the class SAMLIdentityFederationTestCase method deleteAddedUsers.
private void deleteAddedUsers() throws RemoteException, UserAdminUserAdminException {
UserManagementClient usrMgtClient = new UserManagementClient(getSecondaryISURI(), "admin", "admin");
usrMgtClient.deleteUser(usrName);
}
use of org.wso2.identity.scenarios.commons.clients.UserManagementClient in project product-is by wso2.
the class SAMLIdentityFederationTestCase method addUserToSecondaryIS.
private boolean addUserToSecondaryIS() throws Exception {
UserManagementClient usrMgtClient = new UserManagementClient(getSecondaryISURI(), "admin", "admin");
if (usrMgtClient == null) {
return false;
} else {
String[] roles = { usrRole };
usrMgtClient.addUser(usrName, usrPwd, roles, null);
if (usrMgtClient.userNameExists(usrRole, usrName)) {
return true;
} else {
return false;
}
}
}
Aggregations