Skip to content

Instantly share code, notes, and snippets.

View fiorix's full-sized avatar

Alexandre Fiori fiorix

View GitHub Profile
@fiorix
fiorix / go-yeah.go
Last active August 29, 2015 14:24 — forked from gleicon/go-yeah.go
package main
import (
"flag"
"io"
"net/http"
"os"
"strings"
"github.com/gorilla/handlers"
@fiorix
fiorix / OAuth2.md
Created November 21, 2014 02:47 — forked from mziwisky/Oauth2.md

OAUTH2

The Problem

I’m a web app that wants to allow other web apps access to my users’ information, but I want to ensure that the user says it’s ok.

The Solution

I can’t trust the other web apps, so I must interact with my users directly. I’ll let them know that the other app is trying to get their info, and ask whether they want to grant that permission. Oauth defines a way to initiate that permission verification from the other app’s site so that the user experience is smooth. If the user grants permission, I issue an AuthToken to the other app which it can use to make requests for that user's info.

Note on encryption

Oauth2 has nothing to do with encryption -- it relies upon SSL to keep things (like the client app’s shared_secret) secure.