}
catch (IOException e)
{
throw new RuntimeException(e);
}
for (String res : scope.keySet())
{
Resource resource = identityManager.getResource(realm, res);
ScopeMapping scopeMapping = identityManager.getScopeMapping(realm, resource, client);
RoleMapping roleMapping = identityManager.getRoleMapping(realm, resource, user);
SkeletonKeyToken.Access access = token.addAccess(resource.getName());