Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationInfo ¶
type AuthenticationInfo interface {
// 委托人
Principal() lang.Object
Roles() string
Success() bool
Message() string
}
Authentication (认证) info
type AuthenticationManager ¶
type AuthenticationManager interface {
Providers() []AuthenticationProvider
Authenticate(token AuthenticationToken) (AuthenticationInfo, error)
}
Authentication 管理器
type AuthenticationProvider ¶
type AuthenticationProvider interface {
Name() string
Supports(token AuthenticationToken) bool
Authenticate(token AuthenticationToken) (AuthenticationInfo, error)
}
Authentication 服务提供者
type AuthenticationToken ¶
type AuthenticationToken interface {
// 实现机制
Mechanism() string
// 委托人
Principal() lang.Object
// 凭证
Credentials() lang.Object
}
Authentication (认证) token
type Authorization ¶
Authorization 授权
type DefaultAuthenticationManager ¶
type DefaultAuthenticationManager struct {
// context application.Context
ProviderList []AuthenticationProvider
}
func (*DefaultAuthenticationManager) Authenticate ¶
func (inst *DefaultAuthenticationManager) Authenticate(token AuthenticationToken) (AuthenticationInfo, error)
func (*DefaultAuthenticationManager) Providers ¶
func (inst *DefaultAuthenticationManager) Providers() []AuthenticationProvider
Click to show internal directories.
Click to hide internal directories.