oauth2

command
v0.33.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command oauth2 backs the snippets on the doc-site "OAuth2 access-code (Google)" recipe page (usage/examples/auth/oauth2-access-code.md).

The runtime only enters the OAuth2 access-code dance on the protected-route side: a Bearer authenticator validates the inbound access token via an introspection helper. The /login and /auth/callback handlers are plain redirect/exchange handlers that live in user code.

External dependencies on `golang.org/x/oauth2` and `coreos/go-oidc` are deliberately not imported here — they are illustrative of *user* wiring, not of the runtime API. The OAuth2 client and userinfo validator are stubbed at package level so the snippet itself shows real runtime calls without bloating the doc-examples module with auth provider SDKs.

`go run .` exercises the demo wiring against a no-op spec.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL