Documentation
¶
Index ¶
Constants ¶
View Source
const BizIDName = "biz_id"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InterceptorBuilder ¶
type InterceptorBuilder struct {
// contains filtered or unexported fields
}
func NewJwtAuth ¶
func NewJwtAuth(key string) *InterceptorBuilder
func (*InterceptorBuilder) Decode ¶
func (b *InterceptorBuilder) Decode(tokenString string) (jwt.MapClaims, error)
func (*InterceptorBuilder) Encode ¶
func (b *InterceptorBuilder) Encode(customClaims jwt.MapClaims) (string, error)
Encode 生成 JWT Token,支持自定义声明和自动添加标准声明
func (*InterceptorBuilder) JwtAuthInterceptor ¶
func (b *InterceptorBuilder) JwtAuthInterceptor() grpc.UnaryServerInterceptor
Click to show internal directories.
Click to hide internal directories.