Skip to content

v0.9.0

Choose a tag to compare

@libraz libraz released this 01 May 18:40

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.0

Go 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.0

Quickstart

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 lock

The 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