auth

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrModelNotAllowed = errors.New(consts.ErrModelNotAllowed)

Functions

func AuthorizeModel added in v0.0.13

func AuthorizeModel(user *app.UserInfo, model string) error

func TokenAuth

func TokenAuth(store *cache.Store) gin.HandlerFunc

func TokenAuthWithFailureWriter added in v0.0.16

func TokenAuthWithFailureWriter(store *cache.Store, failureWriter TokenAuthFailureWriter) gin.HandlerFunc

TokenAuthWithFailureWriter keeps TokenAuth's authentication and identity semantics while allowing a route family to choose its own failure envelope.

Types

type TokenAuthFailure added in v0.0.16

type TokenAuthFailure struct {
	Status  int
	Code    string
	Message string
}

type TokenAuthFailureWriter added in v0.0.16

type TokenAuthFailureWriter func(*gin.Context, TokenAuthFailure)

Jump to

Keyboard shortcuts

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