We have a legacy application which was developed in Adobe Flex/Java. We have another application being developed in Angular JS. Requirement is to redirect the user from Angular JS app to Flex app. So, we have decided to just do a POST request to Flex app along with passing the parameters in URL. Flex app requires few parameters, like login user details, to login to Flex application. So, When Angular JS redirects the user to Flex app using $location we are also appending the URL with required login user details. However, the problem, I see is , all these values are appearing in browser's URL which is not acceptable to the end user.
My Question is
1) What is the best way to redirect from Angular JS app to Flex app along with passing parameters and not to be visible to users on Browser's URL.
2) If whatever described above is correct, can you please suggest us on how to hide query parameters in browser window ? Can that be handled in Angular JS or do I have to make some changes in Flex app.
Thanks in advance !
There are two more methods to use.
1) Pass parameters to your swf via html embed and read it in swf on load (using FlashVars):
http://kb2.adobe.com/cps/164/tn_16417.html
2) Write login data to browser cookies and read it in swf (using calls to JavaScript in your page via ExternalInterface)
Also please refer to Accessing browser cookies from Flex
Accessing browser cookies from Flex
Original Question:
html form post to flex app
Related
I'm writing a simple desktop application that sometimes needs to upload a compressed archive to OneDrive.
It's the first time I'm messing up with OAuth and I'm trying to understand how to show the user the login page and obtain back the access token.
I understand that the login page is called via this url:
https://login.live.com/oauth20_authorize.srf?client_id={client_id}&scope={scope}&response_type=token&redirect_uri={redirect_uri}
Which is the best way to "show" the login page to the user and wait the redirect with the access code using java?
I'm writing a simple desktop application that sometimes needs to upload a compressed archive to OneDrive
You may try to use the device authorization grant flow.
The service will return a signin URL and a code. Your application then
opens a browser to the returned URL
reguralry polls for a token, which is returned if the user signs in and enters the code
There are ways to embed a web page in the java app, but then you will have to handle the redirect urls, etc.. So for the desktop apps, I find the device grant flow the simplest to implement.
I have a Java desktop application, and I have to open some web page using default browser by click a button. I can do it like this:
Desktop.getDesktop().browse(uri);
But there is a requirement: web page has basic authentication and it must have been passed automatically, without typing login and password by user.
How can I do it?
check out how to operate the Browser (the non-java application) from java using Robots as described here
How is your desktop app authenticating the user?
Do you have an authentication or session ID after the user logs in through your desktop app?
If so, you need to add that to the URI and have a service end-point that knows how to deal with it. Not ideal as you are exposing the authentication ID as part of the URL.
For example
Desktop.getDesktop().browse("https://myservice/loginFromDesktop?auth=" + URLEncoder.encoder(authID, "UTF-8");
This assumes you actually have control over the web service :)
i am new to web services using java. i am working on an application that has login page coded using JAASLoginModule. from there it navigates to pages in the application which are rest-based. when i copy the URL of rest page in another browser, it doesn't ask for credentials.need to implement SSO between these two. could anybody provide pointers for the same as in what method and what all configurations need to be changed?
I'm developing a Dynamic web Project in java, and the goal is upon click on button to fetch the "ITERATION BURNDOWN" graph from https://rally1.rallydev.com.
my question is do i have to know the rally api in order to get this content or just to go to the appropriate url and search there the graph?
i login successfully to the rally (used this link for the login: http://www.mkyong.com/java/how-to-automate-login-a-website-java-example/).
after i login successfully i couldn't get the url with the graph. it's just returning the landing page content.
pls help,
Thanks
I assume that you refer to IterationBurndown on Reports>Reports page, which is served by a legacy analytics engine.
To get the appropriate URL you may need to install IterationBurndown report wrapped in an app from AppCatalog on a custom page in Rally. I cannot confirm a java scenario, but the URL of that custom page can be used with javascript, by making an html file with this custom page embedded using iframe, for example:
iframe.src = "https://rally1.rallydev.com/#/12345d/custom/6789";
The steps are:
create a custom page
install IterationBurndown report from the AppCatalog as an app.
At least in the javascript app case, the URL to IterationBurndown on Reports page will not work for this purpose, hence the extra step of using a custom page.
When you say that you get a landing page, I am not sure if you are referring to login page or home page. If it is the former, it means authentication has not been handled. Legacy IterationBurndown report wrapped in an app will not work with newer ApiKey. That's too bad because ApiKey, unlike LoginKey, works with Java as well, unlike the legacy LoginKey which works in the browser (with html/javascript apps) only.
Redirecting application link to Java - GWT Custom page.
Whenever user will login through my APP.
and user hit button(say add record) then redirection should happen i.e. page should redirected to GWT custom page from application link.
How to call servlet when application link hit by button?
after that How to call GWT page from called servlet.
Wants to show GWT custom page with data present in REQUEST.
Hidden fields available on UI Screen which is developed in GI .
These fields can be passed to GWT custom applications launched from the application link.
APP(UI) --> SERVLET---> GWT page(UI with data present in request i.e jsessionid,hidden fields)
what changes need to do in web.xml ?
Plz provide any helpful document,link,sample code and any idea
Hope for the best co-operation
Thanks in advance.
Do you already have a fixed login page (servlet) tah you must use? Then do this:
Window.Location.assign(loginUrl) will take you to a new page. Your GWT app will be "closed" and all state will be lost.
Your login servlet should redirect back to your GWT page when done. Usually this is done by supplying a URL parameter when invoking login page - check the login servlet. Usually something like http://yourserver.com/login?returnTo=GwtAppUrl.
At this point your user is logged in, which means that servlet has set a session cookie. From this point on (until logout or session time-out) your GWT and GWT-RPC will use this session automatically (browser sends session cookie) - you don't have to do anything.
You can pass some data back to GWT by fragment identifier http://yourserver.com/login?returnTo=GwtAppUrl#somePage/parameter1/parameter2. However better option is to just use GWT-RPC to get the data from server.
Otherwise, if you are making everything from scracth, you can use GWT do do the login: How to implement a login page in a GWT app?