helper

package
v1.0.602 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHelper

type AuthHelper struct {
	Hooks *Hooks
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(opt Options) *AuthHelper

func (*AuthHelper) CheckIncomingRequestAuth

func (c *AuthHelper) CheckIncomingRequestAuth(ctx context.Context, r *http.Request) (nextCtx context.Context, valid bool)

type Hooks

type Hooks struct {
	BeforeAuth HooksFunction
}

type HooksFunction

type HooksFunction func(app types.TokenData, meta grpcutil.NiceMD) (bypass bool, code int, err error)

type Options

type Options struct {
	Name               string
	Tracing            tracinginterface.Tracing
	Auth               authinterfaces.Auth
	Jwt                authinterfaces.Services
	AllowPath          map[string]bool
	IgnoreExpiredToken map[string]bool
	IgnoreScopes       map[string]bool
	IgnoreGroups       map[string]bool
	Hook               *Hooks
}

Jump to

Keyboard shortcuts

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