Documentation
¶
Index ¶
- type AuthService1
- type AuthService2
- type DefaultAuthorizer
- type JWTCodec
- type JWTService
- func (inst *JWTService) Decode(t jwt.Text) (*jwt.DTO, error)
- func (inst *JWTService) Encode(o *jwt.DTO) (jwt.Text, error)
- func (inst *JWTService) GetDTO(c context.Context) (*jwt.DTO, error)
- func (inst *JWTService) GetText(c context.Context) (jwt.Text, error)
- func (inst *JWTService) SetDTO(c context.Context, o *jwt.DTO) error
- func (inst *JWTService) SetText(c context.Context, t jwt.Text) error
- type PasswordAuth
- type TableReg
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 ...
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) 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
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 ...
Click to show internal directories.
Click to hide internal directories.