Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

```
+--------+ +---------------+
Expand All @@ -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`
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
37 changes: 37 additions & 0 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions vendor/github.com/codegangsta/inject
Submodule inject added at 37d7f8
1 change: 1 addition & 0 deletions vendor/github.com/satori/go.uuid
Submodule go.uuid added at 879c58
1 change: 1 addition & 0 deletions vendor/github.com/tidwall/btree
Submodule btree added at 7ebb98
1 change: 1 addition & 0 deletions vendor/github.com/tidwall/buntdb
Submodule buntdb added at 8a270a
1 change: 1 addition & 0 deletions vendor/github.com/tidwall/rtree
Submodule rtree added at 1737a7
1 change: 1 addition & 0 deletions vendor/gopkg.in/session.v1
Submodule session.v1 added at 2d17c7