Skip to content

procolost/goauth2-mongo

 
 

Repository files navigation

Mongo Storage for OAuth 2.0

Build Codecov ReportCard GoDoc License

Install

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

Usage

package main

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

func main() {
	manager := manage.NewDefaultManager()

	// use mongodb token store
	manager.MapTokenStorage(
		mongo.NewTokenStore(mongo.NewConfig(
			"mongodb://127.0.0.1:27017",
			"oauth2",
		)),
	)
	// ...
}

MIT License

Copyright (c) 2016 Lyric

About

MongoDB v4 storage for OAuth 2.0

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%