header

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 3 Imported by: 5 modules, 3 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenCarrier

type TokenCarrier struct {
	// 写入到 resp 中的名字
	// 固定从请求的 Authorization 字段中读取 token,并且假定使用的是 Bearer
	Name string
}

func NewTokenCarrier

func NewTokenCarrier() *TokenCarrier

func (*TokenCarrier) Clear

func (t *TokenCarrier) Clear(ctx *gctx.Context)

func (*TokenCarrier) Extract

func (t *TokenCarrier) Extract(ctx *gctx.Context) string

Extract 固定从 Authorization 中提取

func (*TokenCarrier) Inject

func (t *TokenCarrier) Inject(ctx *gctx.Context, value string)

Jump to

Keyboard shortcuts

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