Skip to content

Navigation Menu

Sign up
avanfirePublic
forked from go-oauth2/mysql

About

MySQL storage for OAuth 2.0

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

History

13 Commits

Folders and files

Repository files navigation

MySQL Storage for OAuth 2.0

Build Codecov ReportCard GoDoc License

Install

$ go get -v github.com/go-oauth2/mysql/v4

Usage

package main
import (
	"github.com/go-oauth2/mysql/v4"
	"github.com/go-oauth2/oauth2/v4/manage"
	_ "github.com/go-sql-driver/mysql"
)
func main() {
	manager := manage.NewDefaultManager()
	// use mysql token store
	store := mysql.NewDefaultStore(
		mysql.NewConfig("root:123456@tcp(127.0.0.1:3306)/myapp_test?charset=utf8"),
	)
	defer store.Close()
	manager.MapTokenStorage(store)
	// ...
}

MIT License

Copyright (c) 2018 Lyric

About

MySQL storage for OAuth 2.0

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /