oslc / oslc-browser Goto Github PK
View Code? Open in Web Editor NEWDemonstrates a React/Carbon Web app that supports navigating and browsing OSLC resources.
License: Apache License 2.0
Demonstrates a React/Carbon Web app that supports navigating and browsing OSLC resources.
License: Apache License 2.0
Some ideas on future features:
Can we provide a resource URI as a HTTP parameter, so the app starts with that resource already fetched and displayed?
Maybe there's a problem with the quality factor is not specified or is the same, servers seem to return application/rdf+xml. Accept="application/x-oslc-compact+xml;q=0.5,application/rdf+xml;q=0.4" seemed to work for DNG, but maybe it doesn't for RTC.
Without disabling any Chrome security:
Header set Access-Control-Allow-Headers "Content-Type, OSLC-Core-Version"
(Apache) needs to be added so that JS code can send OSLC-Core-Version
header (as per https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers) as well as use non-common Content-Type
such as RDF (see https://developer.mozilla.org/en-US/docs/Glossary/CORS-safelisted_request_header#Additional_restrictions as to why)Header set Content-Security-Policy "frame-ancestors 'self' *;"
+ Header set Access-Control-Allow-Methods "GET, POST, OPTIONS"
allows other websites to use an OSLC client to talk to their endpoint as well as to embed their delegated UIs in an IFRAME.Header set Access-Control-Allow-Credentials "true"
allows cookies to be forwarded by the browser on JS requests. However, this feature does not allow a '*' in Access-Control-Allow-Origin
. The server MUST reply Access-Control-Allow-Origin: http://localhost:3001
if it wants to let the browser pass auth cookies along with an OSLC Client JS request from that page. This is the only thing that cannot be done via "server config" and shall be done in the response phase of the OSLC server.https://polarion.oslc.itm.kth.se/polarion/oslc/services/catalog returns 200, for example and gives you a login page.
One approach is to request https://polarion.oslc.itm.kth.se/.well-known/resource-that-should-not-exist-whose-status-code-should-not-be-200 beforehand (see protocol-registries/well-known-uris#13 and oslc-op/oslc-specs#460) but it only shows if the server is completely off its meds.
Should we go radical and consider any non-RDF response to be an error?
The redirects in request.authGet() are not working when request.js is used in the browser. Authentication challenges need to be handled by the browser, not the oslc-client.
Work around: login to the CE tools using the browser before attempting to access resources through the oslc-browser web app. The browser will automatically provide the necessary authentication tokens from the user’s session.
See solid-auth-client and profile viewer tutorial for information on how to use rdflib in a browser based application.
Another option might be to explore other options for request.js that work in Node.js and the browser, while also providing the authentication options we need (Basic, Digest, JEE Form, OAuth 1.0a, OpenIDConnect).
RTC users a lot of these and they cause serialization errors. There are currently being filtered out of the OSLCResource as a work around.
Can’t get select or unselect to work to do the highlighting, so there’s no way to unhighlight all the nodes when clicking on empty space. There’s no tap event on the graph that I can find.
Just ran npm install (updated README, btw), got this:
added 1743 packages from 975 contributors and audited 1817 packages in 105.799s
20 packages are looking for funding
run `npm fund` for details
found 2056 vulnerabilities (885 low, 18 moderate, 1152 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
I am curious whether I shall laugh about 1743 deps or cry about 1152 high sec issues?
Getting a CORS error: When running the oslc-browser web app in a different container than the IBM jazz-apps, there will be a CORS error on GET of a IBM ELM resource.
It is possible to configure WebSphere Liberty or Tomcat to enable CORS. Configuring Cross Origin Resource Sharing on a Liberty server should be used for production
Work around: run oslc-browser using https and disable CORS checking in Chrome:
open -n -a Google\ Chrome --args --disable-web-security --user-data-dir
HTTPS=true npm start
Open any ELM resource in order to login and store the authentication tokens in the browser.
Need to configure the App.js to:
https://example.com:9443/rm/rootservices: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
var myRequest = new Request('flowers.jpg');
var myMode = myRequest.mode; // returns "cors" by default
myRequest.mode = 'no-cors'; // might work ok, but probably not for PUT or POST.
Might be able to use an express middleware component to do this.
After managing to get OSLC Browser to work on OSLC CM RefImpl server (via #18; oslc-op/refimpl@66527f6; oslc-op/website-content-negotiation#8), I have gotten this output:
I am trying to understand now how this browser is to be user and what is its utility? It does not seem to handle RootServices, and does not list the SPC properly. I got a bit further with the linked resources from RefImpl:
Questions:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.