auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package auth provides HTTP authentication middleware for the MCP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bearer

func Bearer(token string, next http.Handler) http.Handler

Bearer wraps next, accepting only requests whose Authorization header carries the configured bearer token. Both sides are SHA-256 hashed before the constant-time compare so the comparator always sees fixed-length input, regardless of attacker-controlled token length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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