command
module
Version:
v0.0.0-...-987a2ef
Opens a new window with list of versions in this module.
Published: Jun 10, 2020
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
osin-storage
A storage backend for osin oauth2 with:
This project was inspired from ory-am
Addition features
- Save map and struct meta information with
JSON
(or JSONB
) for Client and Authorization
- Use
SaveClient()
instead of CreateClient()
and UpdateClient()
- Add
AllClients() []
interface for management
- Add remember function for authorization
Prepare database
cat storage/database/oauth_schema.sql | docker exec -i osin-db psql -U osin
Example
import (
"database/sql"
_ "github.com/lib/pq"
"github.com/liut/osin-storage/storage/sqlstore"
"github.com/openshift/osin"
)
func main () {
dsn := "postgres://osin:osin@127.0.0.1:5432/osin?sslmode=disable"
db, err := sql.Open("postgres", dsn)
if err != nil {
log.Fatal(err)
}
store := sqlstore.New(db)
server := osin.NewServer(newOsinConfig(), store)
}
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Package storage defines an interface, which all osin-storage implementations are going to support.
|
Package storage defines an interface, which all osin-storage implementations are going to support. |
|
|
pg
Package pg is a osin storage implementation for postgres.
|
Package pg is a osin storage implementation for postgres. |
|
|
Click to show internal directories.
Click to hide internal directories.