auth

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//AuthorizationType 鉴权类型
	AuthorizationType = "Authorization-Type"
	//Authorization 鉴权
	Authorization = "Authorization"

	AuthSkill = "github.com/eolinker/apinto/auth.auth.IAuth"
)

Variables

View Source
var (
	//ErrorInvalidType 非法的鉴权类型
	ErrorInvalidType = errors.New("invalid authorization type")

	//ErrorInvalidUser 非法用户
	ErrorInvalidUser = errors.New("invalid user")

	//ErrorExpireUser 用户已过期
	ErrorExpireUser = errors.New("the user is expired")
)

Functions

func CheckAuthorizationType

func CheckAuthorizationType(supportTypes []string, authType string) error

CheckAuthorizationType 检查鉴权类型是否合法

func CheckSkill

func CheckSkill(skill string) bool

CheckSkill 检查能力

Types

type IAuth

type IAuth interface {
	Auth(ctx http_service.IHttpContext) error
}

IAuth 鉴权接口声明

Jump to

Keyboard shortcuts

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