auth

package
v0.0.0-...-9799e31 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) (jwtv5.Claims, bool)

func NewContext

func NewContext(ctx context.Context, info jwtv5.Claims) context.Context

func StreamAuthInterceptor

func StreamAuthInterceptor(keyFunc jwtv5.Keyfunc, opts ...AuthOption) grpc.StreamServerInterceptor

StreamAuthInterceptor is a gRPC stream server interceptor for JWT authentication.

Types

type AuthOption

type AuthOption func(*authOptions)

func WithClaims

func WithClaims(claimsFunc func() jwtv5.Claims) AuthOption

func WithSigningMethod

func WithSigningMethod(signingMethod jwtv5.SigningMethod) AuthOption

func WithTokenHeader

func WithTokenHeader(header map[string]interface{}) AuthOption

WithTokenHeader withe customer tokenHeader for client side

Jump to

Keyboard shortcuts

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