I need to invoke the native/default browser on the device when an attachment is URL based. Currently I get a blank app page with the word done.
I guess what you mean is that in the response for your adapter procedure's request, there is a string which is a URL.
You do not mention the structure of said response, though...
Either way, theoretically then in your client-side code where the response is handled you you can open it using Cordova InAppBrowser
To open it "inside the app": window.open(the-value-from-your-response-object, '_blank', 'location=yes');
To open it using the system browser: window.open(the-value-from-your-response-object, "_system");
Related
I have a problem, the case is that I want my application made in electron to be downloaded through a url, but with a parameter already entered. That parameter is passed to a rest api via the get method.This parameter must be entered in the executable before downloading it.
Example:
I execute this url in the browser and send it a parameter to my web service https://myweb.com/param1
This link will download my electron application with param1 entered. Any idea how I can do this?
I have 2 opened tab in Postman. One tab calls login API, second calls protected page. If I call the second tab without calling the first I get "Bad request":
but I call the first before with valid credentials:
and the call the second again, then I get protected page:
Where is it and how to get it to set inside my application?
Cookies saved by postman can be viewed by clicking cookies button under Send button.
Refer this
Postman uses a javascript engine based on node js, so cookies are saved in the regular way nodejs does.
About how to use the cookies inside postman, you can use them like this:
console.log(postman.getResponseCookie('cookie name').value);
Here you can find an example of how to manipulate cookies using postman.
If you only want to inspect the cookies you can use the cookie manager.
I have a OData Server which returns me a json.
When I accessing the URL through a browser i need to input the username/password.
Doesn't accept the entries which I do in the pop-up. Need to cancel it and then it shows me a dialog box after which i can see the required json.
I am not able to figure out the kind of authentication in use.
Using basic authentication in Postman client is not working.
Any suggestions as to how do I go about using this URL both in postman and inside an Anuglar JS or Node JS program.
You can install interceptor in postman. Go to cookies tab next to body and install the interceptor then turn it on.After installing interceptor you can login with your user/pass and then send your request.
See this picture.enter image description here
Thanks for the input.
But I got access to the code implementation which is accessing the URI which I want.
So There is a Sharepoint/C# application in the universe which is doing a Forms based authentication to get the data required. :/
Will try to reverse engineer that get it working in my Node App.
Cheers. :)
i can't figure out how to build a OR Code for a Pass that is scannable with the new QR code scanner in iOS7' Passbook App.
When I try to scan a QR Code with a link to a working Pass, the App says it is 'No Pass available for this Card'. Card, hum?!
Any ideas?
For a pass to install, the following criteria have to be met:
The link must be https
The URL must return a valid .pkpass bundle
The Content-Type header must be application/vnd.apple.pkpass
Unfortunately, these requirements are not yet documented, but they are mentioned in the WWDC session What's new in Passbook
The URL contained in the QR code must return a valid PKPASS file and have the correct MIME type in the HTTP response.
Does that help?
I've got a web where logged in users can fill out a form to send information. I wanted my users to do this from a chrome extension too. I managed to get the form to sen information working but I only want to be logged in users to be able to do that. It's like a twitter or Springpad extension when the user first opens up the extension, it would have to log in or register. I saw the following answer at stack overflow: Login to website with chrome extension and get data from it
I gave it a try and put this code in background.html:
function login() {
$.ajax({
url: "http://localhost/login", type: "GET", dataType: "html", success: function() {
$.ajax({
url: "http://localhost/login", type: "POST", data: {
"email": "me#alberto-elias.com",
"password": "mypassword",
},
dataType: "html",
success: function(data) {
//now you can parse your report screen
}
});
}
});
}
In my popup.html I put the following code:
var bkg = chrome.extension.getBackgroundPage()
$(document).ready(function() {
$('#pageGaffe').val(bkg.getBgText());
bkg.login();
});
And on my server, which is in node.js, I've got a console.log that shows user information when he logs in, so I saw that when I load my extension, it does log in. The problem is how can I get the user to log in by itself, instead of manually putting my details in the code, how to stay logged in in the extension and when submitting the form, sending the user's details to the web.
I hope I've managed to explain myself correctly.
Thanks.
Before answering this question I would like to bring to your notice that you can make cross origin xhr from your content scripts as of Chrome 13 if you have declared proper permissions. Here is the extract from the page
Version note: As of Chrome 13, content scripts can make cross-origin requests to the same servers as the rest of the extension. Before Chrome 13, a content script couldn't directly make requests; instead, it had to send a message to its parent extension asking the extension to make a cross-origin request.
Coming to the point. You simply have to make an XmlHttpRequest to your domain from your extension (content script or background page) and wait for the response.
At Server
Read the request and session cookie. If session is valid send proper response, else send an error code. 401 or anything else.
At client
If response is proper display it, else display a login link directing to login page of your website.
How it works:
It will work if cookies in user's browser is enabled. Whenever user logs in to your website your server sets a session cookie which resides in user's browser. Now with every request that the browser sends to your domain, this cookie is transmitted. This cookie will be transmitted even if the request is from a Google Chrome Extension.
Caveat
Make sure you display proper cues to user indicating that they are logged in to your application. Since your UI will be mostly inside the extension, it is possible that user might not be aware of their valid session with your website and they might leave an active session unattended which might be abused if user is accessing it from a public internet kiosk.
Reference
You can take a look at a similar implementation that I have done with my extension here.
So the user logs into your server and you know that. I am a bit confused if you then want the user to be able to browse your website with those credentials or a third party website with those credentials.
If it is your website then you should be able to set a cookie that indicates whether they are logged in. Then detect this server side when they navigate your site.
If it is a third party site then the best you can do is create a content script that either fills out the login form and autosubmits for them or analyze the login post data and send it along yourself, then force a refresh.