restlet

SAML with ADFS for angularjs+java+jetty webapp

谁说胖子不能爱 提交于 2019-12-08 11:37:27
问题 I am working on a webapp, the Front-end is implemented in AngularJS which talks to back-end server by invoking REST API. The back-end is Java REST Server implemented using reslet framework deployed in Jetty. Currently, when a user logs into a web app, a REST API is invoked which then goes to the Java REST server. The server then authenticates the user. I want to implement SSO using SAML. So when a corporate user tries to login to the app, the user must be redirected to ADFS. If the user is

Camel Restlet -How to expose service using SSL

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 10:19:40
问题 I'm exposing few REST services using the latest Apache Camel (2.14), more precisely using the Restlet Component (http://camel.apache.org/restlet.html). Is there a way to expose the services under HTTPS ? I cannot find any documentation explaining how to set the SSL keystore, keystore password, etc... 回答1: Current camel-restlet doesn't support set the SSLContext information, I just fill a JIRA for it. 来源: https://stackoverflow.com/questions/26503762/camel-restlet-how-to-expose-service-using

Chrome under Windows 7 and 8 cannot connect to embedded Jetty 9.2.x over HTTPS

[亡魂溺海] 提交于 2019-12-08 09:54:18
问题 We're using Jetty 9.2.x in the embedded mode in conjunction with Restlet 2.3.1 to develop our application sever. Recently we've enabled support for HTTPS, which utilises a certificated signed by a self-established CA. Everything seemed to be working correctly when connecting to this server from various web browsers under Linux and Mac operating systems. However, when we expended out testing to machines running Windows 7 and 8 (all machines are on the same LAN), we've discovered that the

import package without edit the manifest file in org.restlet

一笑奈何 提交于 2019-12-08 09:18:37
问题 I am using Restlet for my communication between my clients (JSE2) and my server(GAE). The clients are OSGi based. I have a shared bundle containing my resource interfaces and a bundle containing the code to wrap a resource to a ClientResource. But the org.restlet bundle doesn't import any of these bundles. I think its not the right solution to edit the manifest of the org.restlet bundle and import the shared bundle manualy. Also this is a very static solution. Is there a beter way to import

Freemarker URL Template Loader

微笑、不失礼 提交于 2019-12-08 07:50:22
问题 I would like to load Freemarker templates from one or more URLs so I subclassed the URLTemplate loader class and overrode the getURL(..) method to return the target URL (see below). I then added a couple of instances of this class to a multi template loader and added that to the Freemarker config. This works fine when the first URL returns a template but when it doesn't none of the other template loaders are called. What have I done wrong? I'm using v2.3 of Freemarker via the Restlet

RESTlet Authorization Filter

帅比萌擦擦* 提交于 2019-12-08 05:46:09
问题 I am developing a RESTlet API (JAVA), and I've created a custom authorization filter that I run all requests through before passing it to my router. In my requests I always pass the session ID as a request attribute, e.g. http://localhost:8080/myAPI/{sid}/someResource/ Now, in my functions that extends ServerResource , I can do something like this to easily extract that {sid} : String sid = (getRequestAttributes().containsKey("sid")) ? getRequestAttributes().get("sid").toString() : ""; My

How can I speed up Restlet for Android when using OData?

自古美人都是妖i 提交于 2019-12-08 05:45:40
问题 I am attempting to use Restlet for Android to query an OData data source. However, I am not impressed with its performance in both the emulator as well on a real device. I have the requests made in a wrapper AsyncTask to make the UI responsive but it still takes over 1 minute to finally return the objects. I get plenty of these in the LogCat window: 10-04 18:20:41.667: DEBUG/dalvikvm(278): GC freed 7872 objects / 523928 bytes in 279ms What can I do to speed up the queries? 回答1: Check out

How to get HttpServletResponse object in restlet for GAE BlobStore serve

可紊 提交于 2019-12-08 03:02:22
问题 I'm using Restlet with GAE, and the GAE Blobstore API requires a HttpServletRequest object for uploading blobs and a HttpServletResponse object for serving them. Is there any way to get the HttpServletResponse object from the restlet Response? 回答1: You can use the utility class org.restlet.ext.servlet.ServletUtils to get to the HttpServletRequest : org.restlet.Request restletRequest = getRequest(); HttpServletRequest servletRequest = ServletUtils.getRequest(restletRequest); and similar for

RESTlet Authorization Filter

点点圈 提交于 2019-12-07 09:15:32
I am developing a RESTlet API (JAVA), and I've created a custom authorization filter that I run all requests through before passing it to my router. In my requests I always pass the session ID as a request attribute, e.g. http://localhost:8080/myAPI/{sid}/someResource/ Now, in my functions that extends ServerResource , I can do something like this to easily extract that {sid} : String sid = (getRequestAttributes().containsKey("sid")) ? getRequestAttributes().get("sid").toString() : ""; My problem is, in my authorization function, which extends Filter (the authorization function is not called

Python's urllib2.urlopen() hanging with local connection to a Java Restlet server

大城市里の小女人 提交于 2019-12-07 00:13:31
问题 I'm trying to connect to a local running Restlet server from python, but the connection hangs infinitely (or times out if I set a timeout). import urllib2 handle = urllib2.urlopen("http://localhost:8182/contact/123") # hangs If I use curl from a shell to open the above URL, the results return quickly. If I use urllib2 to open a different local service (e.g. a Django web server on port 8000), urllib2 works fine. I've tried disabling firewall (I'm doing this on OS X). I've tried changing