java - Write proxy/wrapper class for own service in jersey -
I want to use a full rest of the service with basic http auth running.
To solve this problem, I have thought about various ways
- Someone has suggested to remove it, but when pressing a credential box There is no way for javascript browser clients.
Authenticate the header with a WWW-one filter (I do not think this is a clear perspective)
- I do not re-use my app to use the original http at least I can say a proxy that talks to my regular service
The last approach I like best I have my regular rest interface, but with those interfaces The option of using Ntrfes are not flexible, which moreover I could unsupported HTTP requests by some browsers later.
This idea has a / api / proxy / {request} path that is a proxy on / API / {request} and a Facebook-graph - such as JSON query {data: {data}, error: {Error}}
This proxy class is located
@ path ("proxy") public class ProxyResource {@GET () @ path ("{url: [ A-zA-Z /] *} ") public string received (@contact request request, @ pathperm (" url ") string url) {// proxy /
} I request Can I use a container (Rick)
Edit: When someone knows better, I am happy to hear about it.
As I started digging in this depth, I found out that 401 was not a problem . The server sent back to the www-authenticate header caused the browser to open the login box.
If there is any interest then I have written a few nodes proxy to remove the www-authenticate from all server requests. / P>
Because this is not the answer to my basic question, I will open it.
Comments
Post a Comment