use of org.xdi.oxauth.client.uma.UmaMetadataService in project oxTrust by GluuFederation.
the class AppInitializer method initUmaMetadataConfiguration.
@Produces
@ApplicationScoped
@Named("umaMetadataConfiguration")
public UmaMetadata initUmaMetadataConfiguration() throws OxIntializationException {
String umaConfigurationEndpoint = getUmaConfigurationEndpoint();
if (StringHelper.isEmpty(umaConfigurationEndpoint)) {
return null;
}
UmaMetadataService metaDataConfigurationService = UmaClientFactory.instance().createMetadataService(umaConfigurationEndpoint);
UmaMetadata metadataConfiguration = metaDataConfigurationService.getMetadata();
if (metadataConfiguration == null) {
throw new OxIntializationException("UMA meta data configuration is invalid!");
}
return metadataConfiguration;
}
Aggregations