Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientDetails ¶
type ClientDetails interface { // 获取ClientID GetClientID() string // 获取可以访问的资源ID GetResourceIDs() []string // 验证此客户端是否需要秘钥 IsSecretRequired() bool // 获取客户端秘钥 GetClientSecret() string // 是否需要验证 scope IsScoped() bool // 获取 scope GetScope() []string // 客户端的授权类型 GetAuthorizedGrantTypes() []string // 获取授权码模式预定义的重定向uri GetRegisteredRedirectURI() []string // 获取授予客户端的权限 GetAuthorities() []core.GrantedAuthority // 客户端访问令牌有效时间,单位秒 GetAccessTokenValiditySeconds() int // 客户端刷新令牌有效时间,单位秒 GetRefreshTokenValiditySeconds() int // 指定scope是否需要用户授权批准,如果不需要用户批准则返回ture IsAutoApprove(string) bool // 客户端的额外附加信息 GetAdditionalInformation() map[string]interface{} }
ClientDetails 客户端详情
type NilClientdetails ¶
type NilClientdetails struct{}
NilClientdetails 空实现
func (*NilClientdetails) LoadClientByClientID ¶
func (*NilClientdetails) LoadClientByClientID(string) (ClientDetails, error)
LoadClientByClientID 根据 clientID 获取客户端详细信息
type Service ¶
type Service interface { // 根据 clientID 获取客户端详细信息 LoadClientByClientID(string) (ClientDetails, error) }
Service 获取客户端详细信息
type UserDetailsService ¶
type UserDetailsService struct {
ClientDetailsService Service
}
UserDetailsService client实现
func NewClientDetailsUserDetailsService ¶
func NewClientDetailsUserDetailsService(service Service) *UserDetailsService
NewClientDetailsUserDetailsService 实例化
func (*UserDetailsService) LoadUserByUsername ¶
func (s *UserDetailsService) LoadUserByUsername(username string) (userdetails.UserDetails, error)
LoadUserByUsername 加载指定 username 的用户
Click to show internal directories.
Click to hide internal directories.