helper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 13 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
	Ignoreexptoken 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