Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModuleT ¶ added in v1.0.20
func ModuleT() *application.ModuleBuilder
ModuleT 导出模块[github.com/starter-go/security]
Types ¶
type Session ¶ added in v1.0.20
type Session interface {
Get() *rbac.SessionDTO
Set(s *rbac.SessionDTO)
UserID() rbac.UserID
UserName() rbac.UserName
Nickname() string
Avatar() string
Roles() []rbac.RoleName
Authenticated() bool
}
Session 代表当前会话
type SessionProvider ¶ added in v1.0.20
type SessionProvider interface {
Support(c context.Context) bool
Current(c context.Context) (Session, error)
}
SessionProvider 会话的实现方案
type SessionRegistration ¶ added in v1.0.20
type SessionRegistration struct {
Name string
Enabled bool
Priority int
Provider SessionProvider
}
SessionRegistration 会话方案的注册信息
type SessionRegistry ¶ added in v1.0.20
type SessionRegistry interface {
Registration() *SessionRegistration
}
SessionRegistry 会话方案的注册接口
type SessionService ¶ added in v1.0.20
SessionService 是针对 SessionDTO 的服务
Click to show internal directories.
Click to hide internal directories.