access

package
v0.0.0-...-e2a0a66 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScannerNameFromContext

func ScannerNameFromContext(ctx context.Context) (string, error)

Types

type Auth

type Auth struct {
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(cfg *util.Config) *Auth

func (*Auth) AppendInstance

func (a *Auth) AppendInstance(am AuthMethod)

func (*Auth) GetMiddleware

func (a *Auth) GetMiddleware() gin.HandlerFunc

type AuthMethod

type AuthMethod interface {
	Verify(*gin.Context) error
}

type Logger

type Logger interface {
	Error(...interface{})
	Warn(...interface{})
}

type TokenAuthMethod

type TokenAuthMethod struct {
	// contains filtered or unexported fields
}

func NewTokenAuthMethod

func NewTokenAuthMethod(l Logger, cfg *util.Config) *TokenAuthMethod

func (TokenAuthMethod) Verify

func (tam TokenAuthMethod) Verify(c *gin.Context) error

type TokenClaims

type TokenClaims struct {
	Version string `json:"version"`
	jwt.RegisteredClaims
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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