hiauth

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGroupKeyAuthMiddleware

func AddGroupKeyAuthMiddleware(g *echo.Group)

Types

type ApiKey

type ApiKey struct {
	ID        uint32 `path:"apikeyid" gorm:"primaryKey;autoIncrement"`
	Key       string `path:"apikey" gorm:"uniqueIndex;not null"`
	Policy    datatypes.JSON
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

func (*ApiKey) Conditions

func (ak *ApiKey) Conditions(s service, a action) (Conditions, error)

func (*ApiKey) IsValid

func (ak *ApiKey) IsValid() bool

func (*ApiKey) LoadByID

func (ak *ApiKey) LoadByID(id uint32) (bool, error)

func (*ApiKey) LoadByKey

func (ak *ApiKey) LoadByKey(k string) (bool, error)

type AuthContext

type AuthContext struct {
	echo.Context
	ApiKeyID uint32
}

func (*AuthContext) DumpKeyID

func (ac *AuthContext) DumpKeyID()

type Condition

type Condition string

type Conditions

type Conditions []Condition

Jump to

Keyboard shortcuts

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