Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GinAuthMiddleware ¶
type GinAuthMiddleware[capRule any] struct { // contains filtered or unexported fields }
GinAuthMiddleware provides a tailscale-backed auth middleware implementing middleware/auth.Middleware.
func NewGinAuthMiddleware ¶
func NewGinAuthMiddleware[capRule any](who tailscale.WhoIsFunc, capName tailcfg.PeerCapability) *GinAuthMiddleware[capRule]
NewGinAuthMiddleware constructs middleware from a WhoIsFunc, enabling unit tests and alternative identity sources.
func NewGinAuthMiddlewareFromServer ¶
func NewGinAuthMiddlewareFromServer[capRule any](tsServer *tailscale.Server, capName tailcfg.PeerCapability) *GinAuthMiddleware[capRule]
NewGinAuthMiddlewareFromServer keeps backward compatibility by deriving the resolver from *tailscale.Server.
Click to show internal directories.
Click to hide internal directories.