From d1fff4dab61d7e923bde5efe593f869fb5cef1a1 Mon Sep 17 00:00:00 2001 From: lyric Date: Fri, 5 Aug 2016 10:07:26 +0800 Subject: [PATCH] Add glide support --- README.md | 35 ++++++++++++++------------ glide.lock | 37 ++++++++++++++++++++++++++++ glide.yaml | 9 +++++++ vendor/github.com/codegangsta/inject | 1 + vendor/github.com/satori/go.uuid | 1 + vendor/github.com/tidwall/btree | 1 + vendor/github.com/tidwall/buntdb | 1 + vendor/github.com/tidwall/rtree | 1 + vendor/gopkg.in/session.v1 | 1 + 9 files changed, 71 insertions(+), 16 deletions(-) create mode 100644 glide.lock create mode 100644 glide.yaml create mode 160000 vendor/github.com/codegangsta/inject create mode 160000 vendor/github.com/satori/go.uuid create mode 160000 vendor/github.com/tidwall/btree create mode 160000 vendor/github.com/tidwall/buntdb create mode 160000 vendor/github.com/tidwall/rtree create mode 160000 vendor/gopkg.in/session.v1 diff --git a/README.md b/README.md index 080dcf4..32829b0 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ -OAuth 2.0 -========= +# OAuth 2.0 + > An open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications. [![GoDoc](https://godoc.org/gopkg.in/oauth2.v3?status.svg)](https://godoc.org/gopkg.in/oauth2.v3) [![Go Report Card](https://goreportcard.com/badge/gopkg.in/oauth2.v3)](https://goreportcard.com/report/gopkg.in/oauth2.v3) [![Build Status](https://travis-ci.org/go-oauth2/oauth2.svg?branch=master)](https://travis-ci.org/go-oauth2/oauth2) -Protocol Flow -------------- +## Protocol Flow ``` +--------+ +---------------+ @@ -29,14 +28,21 @@ Protocol Flow +--------+ +---------------+ ``` - -Quick Start ------------ +## Quick Start ### Download and install ``` bash -$ go get -u -v gopkg.in/oauth2.v3 +$ go get -u gopkg.in/oauth2.v3 +``` + +#### Or use [glide](https://github.com/Masterminds/glide) + +``` bash +$ cd $GOPATH/src +$ git clone https://github.com/go-oauth2/oauth2 gopkg.in/oauth2.v3 +$ cd gopkg.in/oauth2.v3 +$ glide install ``` ### Create file `server.go` @@ -94,8 +100,7 @@ $ ./server http://localhost:9096/authorize?response_type=code&client_id=1&redirect_uri=http%253A%252F%252Flocalhost&scope=all&state=xyz ``` -Features --------- +## Features * Easy to use * Based on the [RFC 6749](https://tools.ietf.org/html/rfc6749) implementation @@ -104,21 +109,19 @@ Features * Support custom scope * Support custom expiration time of the access token -Example -------- +## Example + > A complete example of simulation authorization code model Simulation examples of authorization code model, please check [example](/example) -Storage implements ------------------- +## Storage implements * [BuntDB](https://github.com/tidwall/buntdb)(The default storage) * [Redis](https://github.com/go-oauth2/redis) * [MongoDB](https://github.com/go-oauth2/mongo) -License -------- +## License ``` Copyright (c) 2016, OAuth 2.0 diff --git a/glide.lock b/glide.lock new file mode 100644 index 0000000..34f4a27 --- /dev/null +++ b/glide.lock @@ -0,0 +1,37 @@ +hash: e73aa666c6eab403aa888c237084d226d2e9175278a40230044277fc2e72aef2 +updated: 2016-08-05T09:52:18.431660138+08:00 +imports: +- name: github.com/codegangsta/inject + version: 37d7f8432a3e684eef9b2edece76bdfa6ac85b39 +- name: github.com/satori/go.uuid + version: 879c5887cd475cd7864858769793b2ceb0d44feb +- name: github.com/tidwall/btree + version: 7ebb98011b36ffcdcf7a5d8062d6e6c651a49560 +- name: github.com/tidwall/buntdb + version: 8a270a15341d07288e99e88f07d702e9e19b815e +- name: github.com/tidwall/rtree + version: 1737a7bdeb7e5f8303905c5b385f1eeb0f7272ab + subpackages: + - dims/d1 + - dims/d10 + - dims/d11 + - dims/d12 + - dims/d13 + - dims/d14 + - dims/d15 + - dims/d16 + - dims/d17 + - dims/d18 + - dims/d19 + - dims/d2 + - dims/d20 + - dims/d3 + - dims/d4 + - dims/d5 + - dims/d6 + - dims/d7 + - dims/d8 + - dims/d9 +- name: gopkg.in/session.v1 + version: 2d17c7ca2d2b44a26f3d524a31faddb63d68f37f +testImports: [] diff --git a/glide.yaml b/glide.yaml new file mode 100644 index 0000000..bac3ca6 --- /dev/null +++ b/glide.yaml @@ -0,0 +1,9 @@ +package: gopkg.in/oauth2.v3 +import: +- package: github.com/codegangsta/inject + version: v1.0-rc1 +- package: github.com/satori/go.uuid + version: v1.1.0 +- package: github.com/tidwall/buntdb +- package: gopkg.in/session.v1 + version: v1.0.1 diff --git a/vendor/github.com/codegangsta/inject b/vendor/github.com/codegangsta/inject new file mode 160000 index 0000000..37d7f84 --- /dev/null +++ b/vendor/github.com/codegangsta/inject @@ -0,0 +1 @@ +Subproject commit 37d7f8432a3e684eef9b2edece76bdfa6ac85b39 diff --git a/vendor/github.com/satori/go.uuid b/vendor/github.com/satori/go.uuid new file mode 160000 index 0000000..879c588 --- /dev/null +++ b/vendor/github.com/satori/go.uuid @@ -0,0 +1 @@ +Subproject commit 879c5887cd475cd7864858769793b2ceb0d44feb diff --git a/vendor/github.com/tidwall/btree b/vendor/github.com/tidwall/btree new file mode 160000 index 0000000..7ebb980 --- /dev/null +++ b/vendor/github.com/tidwall/btree @@ -0,0 +1 @@ +Subproject commit 7ebb98011b36ffcdcf7a5d8062d6e6c651a49560 diff --git a/vendor/github.com/tidwall/buntdb b/vendor/github.com/tidwall/buntdb new file mode 160000 index 0000000..8a270a1 --- /dev/null +++ b/vendor/github.com/tidwall/buntdb @@ -0,0 +1 @@ +Subproject commit 8a270a15341d07288e99e88f07d702e9e19b815e diff --git a/vendor/github.com/tidwall/rtree b/vendor/github.com/tidwall/rtree new file mode 160000 index 0000000..1737a7b --- /dev/null +++ b/vendor/github.com/tidwall/rtree @@ -0,0 +1 @@ +Subproject commit 1737a7bdeb7e5f8303905c5b385f1eeb0f7272ab diff --git a/vendor/gopkg.in/session.v1 b/vendor/gopkg.in/session.v1 new file mode 160000 index 0000000..2d17c7c --- /dev/null +++ b/vendor/gopkg.in/session.v1 @@ -0,0 +1 @@ +Subproject commit 2d17c7ca2d2b44a26f3d524a31faddb63d68f37f