Help us shape the future of Go! Take the 2026 Go Developer Survey

authhdr

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package authhdr parses client authentication headers without exposing tokens in URLs.

Index

Constants

This section is empty.

Variables

View Source
var ErrMalformed = errors.New("malformed authorization header")

Functions

func Bearer

func Bearer(value string) (string, bool)

Bearer extracts an Authorization bearer credential. An empty or malformed value is rejected, and the credential is never accepted from a URL.

func MediaBrowser

func MediaBrowser(value string) (map[string]string, error)

MediaBrowser parses the case-sensitive key/value parameters of a MediaBrowser or Emby authorization value. Quoted values may contain commas and backslash-escaped quotes. Percent escapes are decoded after parsing.

func MediaBrowserToken

func MediaBrowserToken(r *http.Request) string

MediaBrowserToken returns legacy header credentials before an ApiKey query parameter. It does not interpret a query credential as Plex auth.

func Plex

func Plex(h http.Header) http.Header

Plex returns X-Plex headers keyed by their canonical HTTP header names.

Types

This section is empty.

Jump to

Keyboard shortcuts

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