viewerauth

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 7 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

Package viewerauth admits only requests that carry a valid viewer token from the runner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(keys []ed25519.PublicKey, app, callPath string, next http.Handler) http.Handler

Middleware verifies the token of every request for app and puts what it names in the request context. A request to callPath must carry a call token, which names the calling app; any other request must carry a viewer token, which names none. Requests without a fitting, valid token get 401 and never reach next.

A viewer token and a call token made for a viewer put the viewer and the raw token in the context; a call token also puts the calling app. A token for a call an app makes as itself puts only the calling app.

Types

This section is empty.

Jump to

Keyboard shortcuts

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