Skip to content

ashishpratapsingh14/mysql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Storage for OAuth 2.0

Build Codecov ReportCard GoDoc License

Install

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

Usage

package main

import (
	"gopkg.in/go-oauth2/mysql.v3"
	"gopkg.in/oauth2.v3/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

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%