use of org.xdi.oxauth.model.uma.ScopeDescription in project oxAuth by GluuFederation.
the class UmaScopeWSTest method scopePresence.
// private MetadataConfiguration m_configuration;
//
// @Parameters({"umaConfigurationPath"})
// @Test
// public void init(final String umaConfigurationPath) {
// m_configuration = TUma.requestConfiguration(this, umaConfigurationPath);
// UmaTestUtil.assert_(m_configuration);
// }
@Parameters({ "umaScopePath" })
@Test
public void scopePresence(final String umaScopePath) throws Exception {
String path = umaScopePath + "/" + "modify";
System.out.println("Path: " + path);
Builder request = ResteasyClientBuilder.newClient().target(url.toString() + path).request();
request.header("Accept", UmaConstants.JSON_MEDIA_TYPE);
Response response = request.get();
String entity = response.readEntity(String.class);
BaseTest.showResponse("UMA : UmaScopeWSTest.scopePresence() : ", response, entity);
assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(), "Unexpected response code.");
final ScopeDescription scope = TUma.readJsonValue(entity, ScopeDescription.class);
UmaTestUtil.assert_(scope);
}
use of org.xdi.oxauth.model.uma.ScopeDescription 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);
}
Aggregations