v0.9.0
OpenID Connect Provider (Authorization Server) library for Go. op.New(...) returns a standard http.Handler you mount on net/http, chi, gin, or any router — no framework lock-in, no global state. Targets FAPI 2.0 Baseline / Message Signing.
Install
go get github.com/libraz/go-oidc-provider/op@v0.9.0Go 1.25+. Storage adapters ship as sub-modules so their driver dependencies stay out of your go.sum until you opt in:
go get github.com/libraz/go-oidc-provider/op/storeadapter/sql@v0.9.0
go get github.com/libraz/go-oidc-provider/op/storeadapter/redis@v0.9.0Quickstart
handler, err := op.New(
op.WithIssuer("https://idp.example.com"),
op.WithStore(inmem.New()),
op.WithKeyset(op.Keyset{{KeyID: "k1", Signer: priv}}),
op.WithCookieKey(cookieKey),
)
if err != nil {
log.Fatal(err)
}
log.Fatal(http.ListenAndServe(":8080", handler))For FAPI 2.0 Baseline in a single switch:
op.WithProfile(profile.FAPI2Baseline) // PAR + JAR + DPoP, ES256, alg lockThe constructor refuses to start if the declared profile conflicts with the rest of the options.
Status
Pre-v1.0 — the public API may change in any minor release until v1.0.0. This is a personal hobby project; see the README and SECURITY.md for scope, threat model, and the "what this library is — and is not" boundary.
Links
- Documentation: https://go-oidc-provider.libraz.net
- Go reference: https://pkg.go.dev/github.com/libraz/go-oidc-provider/op
- Examples: https://github.com/libraz/go-oidc-provider/tree/v0.9.0/examples
- Security policy: https://github.com/libraz/go-oidc-provider/blob/v0.9.0/SECURITY.md