You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/DataChassis/go-oauth2-couchdb

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/DataChassis/go-oauth2-couchdb

v0.1.3
Source
Go
Version published
Created
Source

CouchDB Storage for OAuth 2.0

Install

$ go get github.com/DataChassis/go-oauth2-couchdb

Usage

package main

import (
	couchdb "github.com/DataChassis/go-oauth2-couchdb"
	"github.com/go-oauth2/oauth2/manage"
)

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

	// use couchdb token store
	tokenConfig := couchdb.NewConfig("http://localhost:5984", "oauth2-tokens", "username", "password")
	manager.MapTokenStorage(couchdb.NewTokenStore(tokenConfig))

	// use couchdb client store
	clientConfig := couchdb.NewConfig("http://localhost:5984", "oauth2-clients", "username", "password")
	manager.MapClientStorage(couchdb.NewClientStore(clientConfig))

	// ...
}

MIT License

Copyright (c) 2022 Data Chassis Ltd
Portions Copyright (c) 2016 Lyric

FAQs

Package last updated on 26 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts