Out of the two methods of : JS API and OAUTH ,can anyone suggests which one is more reliable and should be used?
I want user to come on my application and from there I want them to login in LinkedIn from where all his personal data will be fetched and shown in my application . I have done this with JS API but still confused b/w the two.
Thanks,
Both are same if you want to use JS API then you may include js code in your code otherwise you can use OAUTH, Both methods are fetching same fields.
If you want to use JS API you can refer these links-
http://www.aspdotnet-suresh.com/2013/05/get-linkedin-logged-in-user.html
for OAUTH - http://mvcrocksonasp.net/OAuthWithMVC4
get code from these links.
Related
I am really stuck and I need your help.
I am working on my web and iOS application. I used also Django to save users to database.
Login function is already working on my web (HTML) but I really don ´t know how to create function to iOS app (Swift).
I enclose also screens of Api HTML and Swift Code. Now it's working only with Facebook. User can sign in using Facebook and order something using iOS App.
I would really like to do the same but with Login Function (not using FB). I hope you can help me. I don't know how to do it and I've read a lot of web.
I would be really glad to you if you can help me.
Please HELP !
Thank you so much.
Image 1 - HTML Urls
Image 2 - Apis
Image 3 - Forms
Image 4 - social_auth_piplines
Image 5 - Models
Image 6 - Swift Apis
This is very broad. There is a lot of questions that need to be answered before I can provide a solid answer but I'll give you an idea on what you have to do.
API
First of all you need an api that serializes the data from your database so it acts as a layer between your app and backend. If you are using Django then take a look at Django Rest Framework which will help you achieve that.
Networking Framework
After setting up your api you need a networking layer in Swift to help you communicate with your api. You can use Swift's URLSession or you can download Alamofire to make things a bit simpler. What a networking layer basically does is fetch the json provided by your Django app and changes it to a Dictionary so you can use it.
In your django Application, you are to specify restframework Authentication to Token. You can get more info about token with django rest auth.
In your iOS.What you need to do is create an AuthServices model. Now in your AuthServices model, you create your login function.
For your login function I assume you are very familiar with Alamofire so you make an API request which would take your parameters and your header which I assume contains a token should also be specified.
Keep your server running and run the application locally if you wish and take username and password with text fields. This should help you go on with it.
Background: I'm trying to use social oath providers to sign up and sign in on an iOS app. I believe MVC's API is the right way of doing this, but I have a few holes.
The MVC API has a GET /Account/ExternalLogin API call that returns valid external login providers, (often social) login options.
How should I use this from iOS?
Additional parts to this question:
I'm not familiar with the x-auth-token header but I think I'll need to use this in combination with the JSON payload itself. How do I use this?
Buried in the payload is a double encoded URL that I can use with something like GTM oAuth. Is this something I need to decode twice before I use it?
GTM oAuth library looks like a candidate library to use to help out.
Is ExternalLogins the right place to start? If I try and login from the app then the app needs to know client secrets and the like. Shouldn't these be managed safely in the API?
I'm happy to refine this question if it's not up to scratch before you reject it.
Thanks!
I did some web search and found nothing for the question i have with me, so I'm posting it here. I wants to build a simple Ruby On rails web application which will be used to display the search result from a third party ebsite without any API avilable. (ex: For example when a user type a keyword and click search i need to get the response from google.com and display that to user in my application).
How can i achieve this?
I hope scrapping is not an advised solution.Is there any advisable techniques(like SOAP 0r REST API).
NOTE: The website is a public government website.i need to access the search from my application(It has no built in API for this purpose).
Google has a search api that you can use https://developers.google.com/custom-search/json-api/v1/overview
and there is a gem available.
https://github.com/google/google-api-ruby-client
We want to use webservice provide by sharepoint. Before we use the webservice , I neet to access the form authentication. Now I'm using a UIWebView to show the web site. It works, but I know it's not the correct way. Can anyone how to do this by code?
use authentication webservice provided by sharepoint, it works.
I have just completed Hartl's book on rails. Following the examples have been helpful and I have been able to build some very basic functionality for my app. However, there is this API I would like to use, and have been granted a key for the API. I have absolutely no idea how to start implementing the API. The other stuff surrounding API's have been helpful, but I literally am stuck on what the very first step should be to begin implementing the API.
I need for a user to be able to sign up and authenticate, then supply data that will be tracked through the external API. I've got the user sign up and authenticate stuff down pat, just need to know what the very first baby step to using this API should be.
The logic behind the answer would be equally helpful.
You can use ActiveResource for your model and point it to the external API. This is useful if your model uses an external data source.
http://api.rubyonrails.org/classes/ActiveResource/Base.html
If the external API you want to use is a well known, there is a good chance that there is already a gem for interaction with that API.
If you only need to send some data to the external API but your model does not use it as its source, you can use an HTTP client like Faraday https://github.com/technoweenie/faraday