use of org.xdi.oxauth.model.uma.UmaConfiguration in project oxAuth by GluuFederation.
the class UmaConfigurationWSTest method configurationPresence.
@Parameters({ "umaConfigurationPath" })
@Test
public void configurationPresence(final String umaConfigurationPath) throws Exception {
final UmaConfiguration c = TUma.requestConfiguration(url, umaConfigurationPath);
UmaTestUtil.assert_(c);
}
use of org.xdi.oxauth.model.uma.UmaConfiguration in project oxAuth by GluuFederation.
the class ScopeHttpTest method scopePresence.
@Test
@Parameters({ "umaMetaDataUrl" })
public void scopePresence(final String umaMetaDataUrl) {
final UmaConfiguration conf = UmaClientFactory.instance().createMetaDataConfigurationService(umaMetaDataUrl).getMetadataConfiguration();
final ScopeService scopeService = UmaClientFactory.instance().createScopeService(conf);
final ScopeDescription modifyScope = scopeService.getScope("modify");
UmaTestUtil.assert_(modifyScope);
}
use of org.xdi.oxauth.model.uma.UmaConfiguration in project oxAuth by GluuFederation.
the class MetaDataFlowHttpTest method testGetUmaMetaDataConfiguration.
/**
* Test for getting meta data configuration
*/
@Test
@Parameters({ "umaMetaDataUrl" })
public void testGetUmaMetaDataConfiguration(final String umaMetaDataUrl) throws Exception {
showTitle("testGetUmaMetaDataConfiguration");
UmaConfigurationService metaDataConfigurationService = UmaClientFactory.instance().createMetaDataConfigurationService(umaMetaDataUrl);
// Get meta data configuration
UmaConfiguration c = null;
try {
c = metaDataConfigurationService.getMetadataConfiguration();
} catch (ClientResponseFailure ex) {
System.err.println(ex.getResponse().getEntity(String.class));
throw ex;
}
UmaTestUtil.assert_(c);
}
use of org.xdi.oxauth.model.uma.UmaConfiguration in project oxAuth by GluuFederation.
the class UmaMultithreadTest method test.
@Test(invocationCount = 30, threadPoolSize = 3)
public void test() {
final UmaConfiguration metadataConfiguration = service.getMetadataConfiguration();
Assert.assertNotNull(metadataConfiguration);
System.out.println(metadataConfiguration);
}
use of org.xdi.oxauth.model.uma.UmaConfiguration in project oxTrust by GluuFederation.
the class AppInitializer method initUmaMetadataConfiguration.
@Produces
@ApplicationScoped
@Named("umaMetadataConfiguration")
public UmaConfiguration initUmaMetadataConfiguration() throws OxIntializationException {
String umaConfigurationEndpoint = getUmaConfigurationEndpoint();
if (StringHelper.isEmpty(umaConfigurationEndpoint)) {
return null;
}
UmaConfigurationService metaDataConfigurationService = UmaClientFactory.instance().createMetaDataConfigurationService(umaConfigurationEndpoint);
UmaConfiguration metadataConfiguration = metaDataConfigurationService.getMetadataConfiguration();
if (metadataConfiguration == null) {
throw new OxIntializationException("UMA meta data configuration is invalid!");
}
return metadataConfiguration;
}
Aggregations