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: 3

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