use of org.simbasecurity.dwclient.gateway.SimbaServiceFactory in project simba-os by cegeka.
the class SimbaManagerRule method before.
private void before() throws IOException, ConfigurationException, SimbaUnavailableException {
SimbaManagerRestConfiguration simbaRestMgrConfig = getSimbaManagerRestConfiguration();
simbaWebResource = getSimbaWebResource(simbaRestMgrConfig);
String simbaWebURL = simbaRestMgrConfig.getSimbaWebURL();
SimbaGateway simbaGateway = new SimbaGateway(simbaWebURL, new SimbaServiceFactory(), new SimbaCredentialsFactory(simbaWebURL));
String appUser = simbaRestMgrConfig.getAppUser();
String appPassword = simbaRestMgrConfig.getAppPassword();
ssoToken = simbaGateway.login(appUser, appPassword);
if (!ssoToken.isPresent()) {
fail(String.format("Unsuccessful login for configured user/password: %s/%s", appUser, appPassword));
}
}
Aggregations