oauth

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 21 Imported by: 1 module, 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

Package oauth makes the MCP address an OAuth 2.1 authorization server, as the MCP specification describes: the metadata, an open dynamic client registration, the consent page and the token endpoint. A connection is a row of tokens of kind oauth: listed, revoked and read-only like an API token.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Challenge

func Challenge(r *http.Request) string

Challenge is the WWW-Authenticate of a 401 on /mcp: where a client finds how to sign in (RFC 9728).

func Issuer

func Issuer(r *http.Request) string

Issuer is the public URL of the MCP address, as the client reached it: the tunnel or proxy in front gives HTTPS and keeps the Host. Plain HTTP on the loopback only, for a test on this machine.

func Routes

func Routes(mux *http.ServeMux, db bun.IDB, multi bool)

Routes adds the OAuth endpoints to mux, beside /mcp; multi asks the account's name on the consent page.

Types

This section is empty.

Jump to

Keyboard shortcuts

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