How to integrate vLine Video Chat in MVC4 application? - asp.net-mvc-4

How to integrate vLine Video Chat in MVC4 application?
https://vline.com/developer/docs/support

We don't have an example for an MVC4 application, but if you take a look at our examples for other languages, you should be able to get an idea of how to do it.
Basically, you need to generate an authToken for your authenticated user and inject that as a JavaScript variable in the page that is displayed to the user. Your JavaScript in the page then uses the vLine API to log in to our cloud and make calls.
For example, here's the page from the node example that shows a call button for other logged-in users. Note that jwt and serviceId are enclosed in `<%= %>'; those are the values that are generated on the server and replaced before serving the page to the user.

Related

Planting an Iframe as Aura component to show an external system that receives information from Salesforce API using oAuth web server flow

I have built a web app for our sales team.
The web app is currently using oAuth web server flow in order to authenticate with Salesforce.
Everything is working fine when running it on a separate tab.
We recently wanted to add some functionality from within Salesforce specific objects and display information from our web app.
So I've built an aura component displaying an Iframe with the URL from our web app.
Unfortunately, it crashes with a console error
Refused to frame 'https://***.my.salesforce.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'".
So I went to Salesforce's login page and indeed, there is a policy header that prevents it from being loaded from within an Iframe.
What is the correct way to authenticate the user with Salesforce in this situation?
Thank you very much
If you are calling a web app inside of an Iframe(Aura component) it would require the Salesforce domain calling it to be whitelisted in the web app.

Minimal Fron End Web Appication with Secure External API Consumption

Problem requirement
Web application with a text field and a button. After introducing some text and clicking on the button, the web application shall call an API using credentials which should be invisible/inaccessible to the web user or its browser. This external API will take the input text an store it into a DB to which it is connected.
Unfortunately the API I need to call contains username and password inside the URL, so that they are visible to the browser.
API Login URL has this profile
https://apidomain/service/login/{{username}/{{password}}
Question
It is there a way to do this only using front end frameworks (vue, react) or static web sites without having to host a back-end service (to perform this external API call)?
I tried this with vuejs 3 successfully, but API call is browser visible.
you can use auth0 it provides fast solution
As far as I know there is no way to hide data except you need back-end auth0 is fast solution
but you might use hash function
hashed = f(username+password) so the user knows the hashed but he couldn't figure what's the username and password it's one way function

Browserless Authentication using the Web API

I am trying to authenticate a user inside a desktop application using the web api. I am not using a browser, I am using straight up GET and PUSH calls to the endpoints of the Spotify servers. Immediately I ran into some problems. It appears that upon the initial GET command to "accounts.spotify.com", the returned response includes HTML with a javascript function that runs and is responsible for dynamically generating HTML that you see on the initial login page. If you look at the Javascript function, it is clear that this is what is going on, however, you can also see this code is obfuscated and not meant to be used by us, the developers! (Link to Javascript code here for reference: Javascript function)
So my question is, while I can probably reverse engineer the code to get this working, would this be against the Spotify developer TOS?
Thanks!
Spotify's authentication happens through oauth, and a big part of user authentication as per the oauth rfc is where the user delegates permissions to your app to carry out API calls that affect their account, or return information about them. That's the web page you're seeing - it must be presented to your users so that they can delegate permissions so that Spotify can give your app an access token. It doesn't necessarily need to happen in a browser - it can happen in a web view inside your desktop application - but it does need to be loaded over https, and your application must not alter or reverse engineer the Spotify permissions delegations page.
As you correctly guessed, reverse engineering any Spotify APIs is against terms of service.
For more information on authorization on the Spotify platform, I'd recommend having a look at this guide.
Hope that helps! Please ping me if you have any more questions.
Hugh
Spotify Developer Support

Is there any login tokenizer machanism available in moqui

I am creating the vuejs app on node js and want to call moqui as rest API. So I just wanted to know is there any mechanism which can be call from vuejs and it will authenticate user credentials by returning a token, so for the next time it will authorize user by token only.
Am I understanding you correctly in that you want a temporary api key to pass to other rest calls?
If so, have a look at the rest.xml screen in the runtime webroot folder. There are lots of examples there.

Retrieving Page from HTTPS Website

I am registered user of a website that provides stock quotes values and I want to create a desktop application where in I will display the stock updates of a specific quotes.
For that, I need to parse a web page which is visible only when I login to the website. If I try to access that page, without logging in, it redirects me to the login page.
The Website does not provide any API for developing such a client application. Is there any way I can login to the website using the desktop client and thus access the required web page?
Regards,
TheLameProgrammer
You'll need to first do a HTTP POST to the login page, store the cookies that come back, then pass these along with any furture request you make.
Same as the browser does.
Hopefully this question is in earnest and not spam but the answer is no