Windows 8.1 JavaScript App Http Windows Authentication - javascript

I am trying to build a metro style line of business app using JavaScript. This app is targeted at enterprise users inside my company firewall - no internet connection.
The app itself will run in Kiosk mode, running as a low-privilege account. I have figured out the CredentialPicker for asking the user for credentials. Now I would like to call an existing WebAPI REST service that is secured with Windows Integrated Authentication on a company server.
How can I make the request using the credential I receive from the CredentialPicker?
Thanks for the help!

Related

How do I send my stripe webhook to my Heroku app?

I've integrated Stripe into my javascript app which works fine in my test environment using ngrok but once I switch to prod, my app is timing out as users attempt to leave the Stripe checkout screen.
The Stripe webhook kicks error Timed out connecting to remote host and I think it's because I have the wrong endpoint.
Testing endpoint
https://6752-136-62-45-90.ngrok.io/users/stripe/webhook
Live endpoint
https://myapp.com/users/stripe/webhook
Everything else in the integration appears to work -- the customer is still created and the billing goes through but I need the endpoint code to run because it builds some critical infrastructure in the user profile.
I also have SSL encryption setup and DNS target on my Heroku application so I'm wondering if I should be using the DNS target or the Heroku app name for the endpoint instead of my domain.
My question
I can't really find any documentation on this but how do I configure my Stripe endpoint with my Heroku-hosted app?
You can test by setting the Heroku app name directly to check if it works to narrow down the issue. If it still doesn't, then most likely it's due to network issue.
Timed out connecting to remote host usually means that the server is not responding. This is likely due to network configuration such as firewall blocking the Stripe IP addresses. I'd recommend checking your network configuration and ensure that Stripe domains/IP addresses are in the allowed list: https://stripe.com/docs/ips

Does FCM (web) use WebSocket for the recipient of messages?

i just wonder how the "FCM" realy works on the web.
does it use websocket ,or it's a built in feature whit in
browsers (chrome,firefox ,...)
FCM (Firebase Cloud Messaging) uses HTTP and XMPP Server Protocol serving JSON and Plain Text both.
FCM Server Protocols
Currently FCM provides these raw server protocols:
FCM HTTP v1 API
Legacy HTTP protocol
Legacy XMPP Protocol
Your app server can use these protocols separately or in tandem. Because it is the most up-to-date and most flexible for sending messages to multiple platforms, the FCM HTTP v1 API is recommended wherever feasible. If your requirements include upstream messaging from devices to the server, you'll need to implement the XMPP protocol.
Please visit About Firebase Cloud Messaging Server | Firebase for more details,https://firebase.google.com/docs/cloud-messaging/server#choose. Hope it helps.
How exactly are web push notifications delivered to a user's device?
There are three actors involved with delivering a web push notification, along with a fourth, optional, component for advanced functionality.
Web Push Notification Service: Each browser, including Chrome, Safari and Firefox have their own notification delivery service. Chrome uses Google Cloud Messaging (and now Firebase Cloud Messaging ), Safari uses Apple Push Notification Service (APNS) and Firefox uses MDN servers.
Service Worker Registration: Developer must register the service worker on the browser. This is only for Chrome and Firefox. Safari while has added support for service-workers, Safari notifications are delivered using a different mechanism.
User’s Subscription ID: Subscriber ID is generated when a user opts in to receive notifications from a specific website.
Additionally an SDK (OS client library Software Development Kit) can be added to a web app for extended segmentation and analytics capabilities.

Authenticate Google Users in Chrome Extension

I have a custom Node.js server using Express and PassportJS (for Google OAuth2.0 authentication). I want to build a Chrome extension that will authenticate through my Node.js server, but is still Google OAuth2.0. Additionally, if a user has signed into the website, the Chrome extension should also be signed in. What are steps I should take to accomplish this? I've taken a look at User Authentication docs but this is what confused me. My auth identity is Google since (client ID, secret are the same), but I'm authenticating through another server.

Cordova plugin for push notification that listen to my own webservice

I am building a cordova mobile application which waits a message from my admin web application server.
The admin application is conected by tcp to a websocket server I implemented on top of ratchet web socket server.
I implemented the binding to my ratchet web service and receiving the message in javascript by using websoket.
Now I want to notify the mobile if the server sends a message and the application is closed.
I want to display this message in the notifications list of the mobile.
After I googled this I found PushPlugin and Pushwoosh and others.
but they deppened on google and iphone services GCM and ANPS or a special web service that does not run on my server .
Is there a plugin that do so or is there a way to solve this.
No, you can't. You can use your own web service but you must cross over APNS and GCM before notification send to user device.
APNS for IOS
GCM for android

openid and facebook authentication in webapp running on localhost

My java/javascript web application is in development, and I hava a javascript application that communicates with my database (where I maintain my own userids) using ajax POST commands to a servlet container running on localhost, within a vmware machine. I want to be able to login using Google, Yahoo, and Facebook authentication, on this development setup, but in studying Facebook's OAuth 2.0 method, it looks like your web application has to hava a link to the facebook site, and provide a redirect link back to your own site when authentication is finished. This method won't work because facebook can't redirect to a localhost address and reach my machine, which doesn't have a web presence.
Do I have the same issues with OpenID and Google/Yahoo authentication?
Andy
Facebook OAuth works with localhost apps. This is because Facebook redirects the browser to the redirect_uri you supply in oauth, your browser knows where http://localhost is (I actually used a virtual host in apache & windows vhosts, don't know if you can enter localhost as website url in your app settings). Works perfectly
Google Oauth however, in my experience, doesn't work on local version. Somehow the site needed to be accessible from Google itself (not just the browser) for this to work, and it didn't, so it doesn't (I don't remember the exact details, sorry)
Don't know about the others
You could add DNS entries on your local machine so that mysite.com resolves to your local computer.
By doing this, you will be able to login from your local machine to do your tests.
In Windows, you can do this by editing the file:
C:\Windows\System32\drivers\etc\hosts
Add a new line:
127.0.0.1 mysite.com
Regarding OpenID, I am not sure if would accept logins from localhost URLs, but it will surely work after adding the entry in the hosts file and having a proper domain (even though it RESOLVES only on your computer).
The trick is that after login, Facebook or Google responds to your application with something like this: redirect the user to mysite.com as authenticated. Your browser then will resolve mysite.com as your machine and it is all working.

Categories

Resources