🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

github.com/bjaiwu/go-oauth2-sqlite

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/bjaiwu/go-oauth2-sqlite

v0.0.0-20210511082858-498c36b7adc7
Source
Go
Version published
Created
Source

Sqlite Storage for OAuth 2.0

[![Build][Build-Status-Image]][Build-Status-Url] [![Codecov][codecov-image]][codecov-url] [![GoDoc][godoc-image]][godoc-url] [![License][license-image]][license-url]

Install

$ go get -u -v github.com/bjaiwu/go-oauth2-sqlite

Usage example

package main

import (
    "database/sql"
	_ "github.com/mattn/go-sqlite3"
	sqlite "github.com/bjaiwu/go-oauth2-sqlite"
	"github.com/jmoiron/sqlx"
)

func main() {

	db, err = sql.Open("sqlite3", "file:db.db?cache=shared") //若数据库没有在这个项目文件下,则需要写绝对路径
	if err != nil {
		panic(err.Error())
	}

	clientStore, _ := sqlite.NewClientStore(db, mysql.WithClientStoreTableName("custom_table_name"))
	tokenStore, _ := sqlite.NewTokenStore(db)
}

MIT License

Copyright (c) 2021 yxge.net

FAQs

Package last updated on 11 May 2021

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