creating oauth login flow for java desktop application - google-drive-api

I was watching the java quickstart video for the google drive API and in that video it is mentioned that when developing real time console application the login flow should be done by :
starting a web browser in the local machine.
opening the native browser and taking the user directly to the authorization link.
making the redirection link as the local host and then let the local server receive the code and then shut down the browser and continue with you app.
but i have no idea how to execute these steps any idea or guidance???

The tiny application on Java quickstart implements these steps. Use "urn:ietf:wg:oauth:2.0:oob" as your redirect URL.

Related

Fail to Deploy Forge by using Azure

I want to ask about the Deployment of Forge API by Azure.
I had done it through the resource from Learn Forge, and it seems to work smoothly on the local site, but when I try to publish it, Although it shows permission
after I sign in, it shows 400 error refused, how can I do this for this error?
This is typically caused by an incorrect callback URL for the 3-legged authentication workflow.
When you develop your application locally, you typically set the callback URL (both in your application's code and in https://forge.autodesk.com/myapps) to something like http://localhost:3000/api/forge/callback/oauth).
However, when you deploy your application to Azure, AWS, Heroku, or any other cloud hosting provider, the callback URL must be updated accordingly. For example, if you deploy your application as an Azure Web App, the callback URL could look something like https://my-cool-app.azurewebsites.net/api/forge/callback/oauth. And again, you'll have to change the URL both in https://forge.autodesk.com/myapps, and in your Azure Web App settings.

Recording Controller in Jmeter not recording in a localhost web server

I'm currently testing my application using phpmyadmin as my local web server.
Here's the steps I've taken so far:
In the Test Plan, I added a Thread Group, an HTTP Request Defaults and Recording Controller.
In the Workbench, I added a HTTP(s) Test Script Recorder, and a View Results Tree.
I already removed the contents in the No proxy for field in my browser, after removing that, the View Results Tree is working and is recording the pages I've navigate in my application.
My problems and questions are:
The Recording Controller is not recording the pages I navigated.
What did I do wrong?
Is Recording Controller not applicable for localhost web server testing?
I hope that someone may help me with this. Thank you.
Check in your browser configuration that localhost is not excluded from proxy managed urls.
Also be aware that you shoud use the Recording Template.
In Menu, select File > Templates > Recording.
See:
http://www.ubik-ingenierie.com/blog/templates-or-how-to-speed-up-your-tests-scripting-with-jmeter/
Also please check if you are using correct path for recording in HTTP(s) Test Script Recorder ->Recording controller, also port number should same on HTTP(s) Test Script Recorder and browser proxy.

Access to json/web service from javascript behind windows authenticated web site?

Is it possible to call json service from JavaScript which is behind a windows authenticated web site?
Ultimately, I would like to do this from phonegap but right now trying to do this from browser.
My first attempt was to open a window have the user authenticate against the server and was hoping subsequent JavaScript/ajax requests would send the authentication information with the request. I don't think this is working is desired. I certainly know from phonegap this is not working.

Start a local program from Chrome/Chromium browser

What are the options for executing a local client-side program directly from Chrome/Chromium?
Here's the criteria:
ease of installation
cross-platform support
control over security (no other than the specified program can be
executed)
Currently, I can think of three options
write a Chrome plugin
clients run a local web server
a Java Applet
Are there any other options? The client side runs Javascript and is accessing a RESTful API to receive the data. Or maybe a way to directly execute a local program with the user's consent from Chrome?

How can I launch an OSX application from the browser?

I'm coding an admin panel with a web interface that will only be run locally (not client-facing or hosted on an external server), and it would be helpful if it could launch an application from an <a href="">. Is this possible? I understand that this could be a browser security thing, but I also know that there are iTunes and App Store links (not quite sure how those work either), and I assume this is also possible for launching "x" application. How can I do this?
it is only possible if the application you want to start registers its own URI scheme with the OS. Though you could write your own app that starts other apps on demand. You'll have to register your own scheme then.
Found a solution! Instead of using an <a href="">, I've decided to run a shell command from a PHP script that just does open application_name.app and redirect back to the referrer.