background preloader

Oauth

Facebook Twitter

Ruby API wrapper using Virtus and Typhoeus. Understand Representational State Transfer (REST) in Ruby. Develop and deploy your nextapp on the IBM Bluemixcloud platform.

Understand Representational State Transfer (REST) in Ruby

Start building for free Representational State Transfer (REST) is an architectural style for web-based communication that permits clients to talk to servers in a unique fashion. In particular, REST represents resources within a given server as uniform resource identifiers (URIs), simplifying the implementation of REST architectures on the Hypertext Transport Protocol (HTTP). Let's begin with an introduction to the ideas behind REST and HTTP. We'll then explore data representation, and then implement a simple REST client in the Ruby language. Quick introduction to HTTP Let's start with a quick introduction to HTTP, as it's important to understand for individual REST transactions. HTTP is a request-and-response protocol—that is, clients make requests, and servers satisfy those requests with a response.

RubyMotion Tutorial. We're going to build a front-end for the Colr JSON API.

RubyMotion Tutorial

Our users can type in a color hex code (i.e. "#3B5998") and then see what tags Colr users have assigned to that color. If our user is feeling particularly adventurous, they can add a new tag! Securing Rest-ful Web Services with OAuth2. Google I/O 2012 - OAuth 2.0 for Identity and Data Access. OAuth that just works.

Great OAuth tutorials for HTML5 applications - HtmlCenter Blog. Applications we build are more and more dependent on 3rd party data sources.

Great OAuth tutorials for HTML5 applications - HtmlCenter Blog

And as Internet of things continues to grow, this fact becomes even more stronger. It allows us to create great experiences for the app end users by presenting them data gathered from across the Internets. Adding HTML5 Local Storage to Your Web App. One of the things we’re working on in the Developer Relations group at LinkedIn is creating tools to help our developers work through issues and questions quickly and easily.

Adding HTML5 Local Storage to Your Web App

The OAuth authentication piece is frequently tricky, so we put together an OAuth Test Console, based on a similar tool from JR Conlin. It’s a handy tool, and certainly makes OAuth debugging much easier, but as a frequent user of the console myself, I found myself quickly getting tired of copying and pasting my consumer key, secret, oauth token, token secret into the fields every time I wanted to use the console.

As a developer/user of the console, though, I certainly didn’t want to have that informations saved in a cookie which would go across the wire every time I used the tool, sharing my secret unencrypted keys. HTML5 local storage to the rescue! This, my friends, is just the kind of thing you can do with the new HTML5 local (browser) storage functionality. Step 1: Don’t tease the IE6 users. JavaScript oAuth. Download source code - 8.4 KB Introduction With most modern applications now using HTML and JavaScript, it is very much a wise idea so you keep up with the current trend.

JavaScript oAuth

Some major entities provide APIs for various reasons which include client authentication and authorization. A popular feature being used for authentication in websites today is "Single Sign-on". This give users the ability to sign into your website using other identity providers especially those from social media websites. Background In order to utilize the API from the Identity providers, you are required to create an application on their websites which will give you an API key to use in the application.

Using the Code If you are not into long reading, you may go ahead and download the source files and use/modify as you please. Firstly, we include some files in the head of our HTML page. <! In recent times, Twitter has deprecated the use of solely client side authentication which may cause some developers to cringe. Facebook. Using OAuth 2.0 for Web Server Applications - Google Accounts Authentication and Authorization. The Google OAuth 2.0 endpoint supports web server applications that use languages and frameworks such as PHP, Java, Python, Ruby, and ASP.NET.

Using OAuth 2.0 for Web Server Applications - Google Accounts Authentication and Authorization

These applications might access a Google API while the user is present at the application or after the user has left the application. This flow requires that the application can keep a secret. OAuth Example w/ Google. Using OAuth 2.0 to Access Google APIs - Google Accounts Authentication and Authorization. Basic steps All applications follow a basic pattern when accessing a Google API using OAuth 2.0.

Using OAuth 2.0 to Access Google APIs - Google Accounts Authentication and Authorization

At a high level, you follow four steps: OAuth2 - google-api-ruby-client - Google APIs Client Library for Ruby. OAuth 2.0 Authorization Code Requests and Responses. The authorization code grant consists of 2 requests and 2 responses in total.

OAuth 2.0 Authorization Code Requests and Responses

An authorization request + response, and a token request + response. Authorization Request The authorization request is sent to the authorization endpoint to obtain an authorization code. Here are the parameters used in the request: Authorization Response. OAuth 2.0 - The Good, The Bad & The Ugly. In a world dominated by social media, it's hard to not come across a client application which you have used to access restricted resources on some other server, for example, you might have used a web-based application (like NY Times) to share an interesting news article on your Facebook wall or tweet about it.

OAuth 2.0 - The Good, The Bad & The Ugly

Or, you might have used Quora's iPhone app that accesses your Facebook or Google+ profile and customizes the results based on your profile data, like suggesting to add/invite other users to Quora, based on your friends list. The question is, how do these applications gain access to your Facebook, Twitter or Google+ accounts and how are they able to access your confidential data? Before they can do so, they must present some form of authentication credentials and authorization grants to the resource server. OAuth 2.0 Playground. Zquestz/omniauth-google-oauth2. OAuth 2.0 - Google APIs Client Library for Ruby. Quick-start sample app for Ruby - Google+ Platform. This quick-start sample app is built in Ruby and lets you get started with the Google+ platform in a few minutes.

Quick-start sample app for Ruby - Google+ Platform

The app demonstrates: Using the Google+ Sign-In button to get an OAuth 2.0 refresh token. Exchanging the refresh token for an access token. Making Google+ API requests with the access token, including getting a list of people that the user has circled. Disconnecting the app from the user's Google account and revoking tokens. System requirements.