Authorization code + PKCE
Issue tokens to web, mobile and single-page apps. Login and consent hand back to pages you own.
Read the flow →v0.1.4 · Go 1.27 · Apache-2.0
Wicket ships the full set of OpenID Connect and OAuth 2.0 endpoints as one http.Handler middleware.
Your login page, your user store, your deployment — Wicket just gets the protocol right.
go get github.com/gonewx/wicket@v0.1.4
// 1. Composition root: wires every protocol service
root, err := di.NewRoot()
if err != nil { log.Fatal(err) }
defer root.Close()
// 2. Inject clients, resources, signing keys and stores
cfg := root.ServerConfig()
cfg.SetClients(clients)
cfg.SetApiScopes(scopes)
cfg.SetRefreshTokenStore(store.NewRefreshTokenStore(pool, logger))
cfg.Freeze() // a missing store fails right here
// 3. Put it in front of the router you already have
srv, _ := server.DefaultServer(root)
http.ListenAndServe(":443",
hosting.ScopeMiddleware(root)(srv.UseWicket()(app)))
Protocol paths are handled by Wicket; every other request reaches your application untouched. No sidecar, no cross-process hop.
Standards-based, opt-in where it matters. Every capability maps to source and tests you can read.
Issue tokens to web, mobile and single-page apps. Login and consent hand back to pages you own.
Read the flow →The shortest path for service-to-service calls: one client, one scope, one request.
Read the flow →Long-lived access via offline_access, backed by a versioned refresh-token store.
Server-initiated authentication confirmed on the user's own device — think call centers and counters.
Read the flow →Standard .well-known metadata, a published key set and token introspection that resource servers can use as-is.
An end-session endpoint with post-logout redirects, plus a pluggable server-side session store.
Read the flow →Google and Facebook sign-in and JWT bearer authentication, wired in through pluggable scheme handlers.
Identity →The keymgmt package rotates keys through candidate, active, retained and retired, so older tokens keep validating.
The core module has zero database drivers. Storage is split into three families of interfaces, and you choose the implementation.
github.com/gonewx/wicket-pg, migrations included.storagetest, sessiontest and keymgmttest — pass them and declare the version you conform to.If a store isn't injected and you haven't explicitly opted into in-memory fallback, assembly fails — instead of losing tokens at random across replicas.
Cleanup of expired data is an entry point you schedule. When it runs, for how long and how it logs is your call.
Expiration is judged against an injected clock, never database time, so clock drift across a cluster can't produce split decisions.
Three standalone packages with no storage and no composition root. Import one and go.
Local validation vs. server exchangeoidcverifywechatverifyphoneverifyWicket is at 0.x: core authorization paths are covered by integration and end-to-end tests, and the public API may still change. Some capabilities are still incomplete — the device authorization and revocation endpoints, refresh-token lifetime policies and front/back-channel logout among them — and the WeChat and phone-number packages have not been exercised against live credentials. The docs mark the status of every capability plainly.
Issue your first token in ten minutes