ConfigurationContext configContext = (ConfigurationContext) UserMgtWSAPIDSComponent
.getCcServiceInstance().getClientConfigContext();
AuthenticationAdminClient client = new AuthenticationAdminClient(configContext,
realmConfig.getRealmProperty(WSRemoteUserMgtConstants.SERVER_URL),
sessionCookie, null, false);
boolean isLogin = client.login(userName, password, "127.0.0.1"); // TODO
if (isLogin) {
sessionCookie = client.getAdminCookie();
}
} catch (Exception e) {
throw new UserStoreException("Error" + e.getMessage(), e);