common

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService1

type AuthService1 struct {
	RegistryList []auth.Registry //starter:inject(".")
	// contains filtered or unexported fields
}

AuthService1 ...

func (*AuthService1) Authenticate

func (inst *AuthService1) Authenticate(a auth.Authentication) (auth.User, error)

Authenticate 验证

func (*AuthService1) Authorize

func (inst *AuthService1) Authorize(a auth.Authorization) error

Authorize 授权

func (*AuthService1) Login

func (inst *AuthService1) Login(c context.Context, a1 auth.Authentication) error

Login 登录

type AuthService2

type AuthService2 struct {
	Servic1 auth.Service //starter:inject("#")
	// contains filtered or unexported fields
}

AuthService2 ...

func (*AuthService2) Login

func (inst *AuthService2) Login(c context.Context, a *rbac.AuthDTO) (*rbac.AuthDTO, error)

Login 登录

type DefaultAuthorizer

type DefaultAuthorizer struct {
	Service jwt.Service //starter:inject("#")
	MaxAge  int         //starter:inject("${security.jwt.max-age}")
	// contains filtered or unexported fields
}

DefaultAuthorizer 是默认的授权组件

func (*DefaultAuthorizer) Authorize

func (inst *DefaultAuthorizer) Authorize(a auth.Authorization) error

Authorize ...

func (*DefaultAuthorizer) ListRegistrations

func (inst *DefaultAuthorizer) ListRegistrations() []*auth.Registration

ListRegistrations ...

func (*DefaultAuthorizer) Support

func (inst *DefaultAuthorizer) Support(a auth.Authorization) bool

Support ...

type JWTCodec

type JWTCodec struct {
	Secret string //starter:inject("${security.jwt.secret}")
	// contains filtered or unexported fields
}

JWTCodec ...

func (*JWTCodec) Decode

func (inst *JWTCodec) Decode(t1 sejwt.Text) (*sejwt.DTO, error)

Decode ...

func (*JWTCodec) Encode

func (inst *JWTCodec) Encode(t1 *sejwt.DTO) (sejwt.Text, error)

Encode ...

func (*JWTCodec) ListRegistrations

func (inst *JWTCodec) ListRegistrations() []*sejwt.Registration

ListRegistrations ...

type JWTService

type JWTService struct {
	RegistryList []jwt.Registry //starter:inject(".")
	// contains filtered or unexported fields
}

JWTService 实现 jwt.Service

func (*JWTService) Decode

func (inst *JWTService) Decode(t jwt.Text) (*jwt.DTO, error)

Decode ...

func (*JWTService) Encode

func (inst *JWTService) Encode(o *jwt.DTO) (jwt.Text, error)

Encode ...

func (*JWTService) GetDTO

func (inst *JWTService) GetDTO(c context.Context) (*jwt.DTO, error)

GetDTO ...

func (*JWTService) GetText

func (inst *JWTService) GetText(c context.Context) (jwt.Text, error)

GetText ...

func (*JWTService) SetDTO

func (inst *JWTService) SetDTO(c context.Context, o *jwt.DTO) error

SetDTO ...

func (*JWTService) SetText

func (inst *JWTService) SetText(c context.Context, t jwt.Text) error

SetText ...

type PasswordAuth

type PasswordAuth struct {
	UserDao rbac.UserDAO //starter:inject("#")
	// contains filtered or unexported fields
}

PasswordAuth ...

func (*PasswordAuth) Authenticate

func (inst *PasswordAuth) Authenticate(a auth.Authentication) (auth.User, error)

Authenticate ...

func (*PasswordAuth) ListRegistrations

func (inst *PasswordAuth) ListRegistrations() []*auth.Registration

ListRegistrations ...

func (*PasswordAuth) Support

func (inst *PasswordAuth) Support(a auth.Authentication) bool

Support ...

type TableReg

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

TableReg ...

func (*TableReg) ListTableRegistrations

func (inst *TableReg) ListTableRegistrations() []*libgorm.TableRegistration

ListTableRegistrations ...

Jump to

Keyboard shortcuts

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