middleware

package
v3.32.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package middleware implements the events middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProtocolAuthentication

func ProtocolAuthentication(prefix string) func(http.Handler) http.Handler

ProtocolAuthentication returns a middleware that authenticates WebSocket requests using the subprotocol. The subprotocol must be prefixed with the given prefix. The token is extracted from the subprotocol and used to authenticate the request. If the token is valid, the subprotocol is removed from the request, and the original authorization header is removed. If the token is invalid, the request is unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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