tslamic / redis

Redis storage for OAuth 2.0

Home Page:https://godoc.org/gopkg.in/go-oauth2/redis.v3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redis Storage for OAuth 2.0

Build Codecov ReportCard GoDoc License

Install

$ go get -u -v gopkg.in/go-oauth2/redis.v3

Usage

package main

import (
	"gopkg.in/go-oauth2/redis.v3"
	"gopkg.in/oauth2.v3/manage"
)

func main() {
	manager := manage.NewDefaultManager()
	
	// use redis token store
	manager.MapTokenStorage(redis.NewRedisStore(&redis.Options{
		Addr: "127.0.0.1:6379",
		DB: 15,
	}))

	// use redis cluster store
	// redis.NewRedisClusterStore()
}

MIT License

Copyright (c) 2016 Lyric

About

Redis storage for OAuth 2.0

https://godoc.org/gopkg.in/go-oauth2/redis.v3

License:MIT License


Languages

Language:Go 100.0%