ORY Fosite is the security first OAuth2 & OpenID Connect framework for Go. Built simple, powerful and extensible. This repository contains an exemplary http server using ORY Fosite for serving OAuth2 requests.
The mongo demo expects that you have a local (default) instance of mongo running.
This means, a mongo listening at localhost:27017
with no authentication enabled.
The easiest way to get this up and running is if you have docker pre-installed.
In a terminal run the following:
docker run -d -p 27017:27017 mongo:7.0
Install the community edition of MongoDB on your computer locally following the steps from mongo's documentation site
The Fosite example server requires [email protected]
or higher installed as it uses go modules for dependency management.
Once Go and mongo have been installed, run the demo:
$ go get -d github.com/matthewhartstonge/storage/example/mongo
$ cd $GOPATH/src/github.com/matthewhartstonge/storage/example/mongo
$ go run main.go