List<String> scopes = new ArrayList<String>(Arrays.asList(secureAnnotation.scopes()));
String[] capabilities = secureAnnotation.capabilities();
for(String cap:capabilities){
try {
scopes.add(new Capability(cap).to(request.getRequestUri().toURL()));
} catch (MalformedURLException e) {
throw new CloudResourceException(500, new CloudResourceError("Invalid host name: "+ request.getRequestUri().toString()));
}
}
logger.debug("Expecting scopes: "+Arrays.toString(scopes.toArray()));