Documentation ¶
Index ¶
- Constants
- func ManagerOptAddProviders(providers ...Provider) core.Opt
- func NewManager(opts ...core.Opt) *defaultManager
- func ProviderOptSetAuthorityMapper(mapper authority.Mapper) core.Opt
- func ProviderOptSetPostChecker(checker userdetails.Checker) core.Opt
- func ProviderOptSetPreChecker(checker userdetails.Checker) core.Opt
- type Authentication
- type BaseAuthentication
- func (auth *BaseAuthentication) GetAuthorities() []authority.GrantedAuthority
- func (auth *BaseAuthentication) GetDetails() interface{}
- func (auth *BaseAuthentication) GetName() string
- func (auth *BaseAuthentication) IsAuthenticated() bool
- func (auth *BaseAuthentication) SetAuthenticated(flag bool) error
- func (auth *BaseAuthentication) SetDetails(details interface{})
- type Manager
- type Provider
- type UserDetailsAuthenticationChecker
- type UserDetailsAuthenticationProvider
- type UsernamePasswordAuthentication
Constants ¶
View Source
const ( KeyProviderPreChecker = "authentication.provider.prechecker.set" KeyProviderPostChecker = "authentication.provider.postchecker.set" KeyProviderAuthorityMapper = "authentication.provider.authority.mapper.set" )
View Source
const (
KeyManagerAddProvider = "authentication.manager.provider.add"
)
Variables ¶
This section is empty.
Functions ¶
func ManagerOptAddProviders ¶
func NewManager ¶
func ProviderOptSetPostChecker ¶
func ProviderOptSetPostChecker(checker userdetails.Checker) core.Opt
func ProviderOptSetPreChecker ¶
func ProviderOptSetPreChecker(checker userdetails.Checker) core.Opt
Types ¶
type Authentication ¶
type BaseAuthentication ¶
type BaseAuthentication struct { Authentication // contains filtered or unexported fields }
func (*BaseAuthentication) GetAuthorities ¶
func (auth *BaseAuthentication) GetAuthorities() []authority.GrantedAuthority
func (*BaseAuthentication) GetDetails ¶
func (auth *BaseAuthentication) GetDetails() interface{}
func (*BaseAuthentication) GetName ¶
func (auth *BaseAuthentication) GetName() string
func (*BaseAuthentication) IsAuthenticated ¶
func (auth *BaseAuthentication) IsAuthenticated() bool
func (*BaseAuthentication) SetAuthenticated ¶
func (auth *BaseAuthentication) SetAuthenticated(flag bool) error
func (*BaseAuthentication) SetDetails ¶
func (auth *BaseAuthentication) SetDetails(details interface{})
type Manager ¶
type Manager interface {
Authenticate(auth Authentication) (Authentication, error)
}
type Provider ¶
type Provider interface { Authenticate(auth Authentication) (Authentication, error) Support(o interface{}) bool }
type UserDetailsAuthenticationChecker ¶
type UserDetailsAuthenticationChecker interface { Retrieve(username string, authentication *UsernamePasswordAuthentication) (userdetails.UserDetails, error) AdditionalAuthenticationCheck(username string, authentication *UsernamePasswordAuthentication) error }
type UserDetailsAuthenticationProvider ¶
type UserDetailsAuthenticationProvider struct { UserDetailsAuthenticationChecker // contains filtered or unexported fields }
func NewUserDetailsAuthenticationProvider ¶
func NewUserDetailsAuthenticationProvider(opts ...core.Opt) *UserDetailsAuthenticationProvider
func (*UserDetailsAuthenticationProvider) Authenticate ¶
func (p *UserDetailsAuthenticationProvider) Authenticate(auth Authentication) (Authentication, error)
func (*UserDetailsAuthenticationProvider) Set ¶
func (p *UserDetailsAuthenticationProvider) Set(key string, value interface{})
func (*UserDetailsAuthenticationProvider) Support ¶
func (p *UserDetailsAuthenticationProvider) Support(o interface{}) bool
type UsernamePasswordAuthentication ¶
type UsernamePasswordAuthentication struct { BaseAuthentication // contains filtered or unexported fields }
func NewUsernamePasswordAuthentication ¶
func NewUsernamePasswordAuthentication(credentials, principal interface{}, authorities []authority.GrantedAuthority) *UsernamePasswordAuthentication
func (*UsernamePasswordAuthentication) GetCredentials ¶
func (auth *UsernamePasswordAuthentication) GetCredentials() interface{}
func (*UsernamePasswordAuthentication) GetPrincipal ¶
func (auth *UsernamePasswordAuthentication) GetPrincipal() interface{}
Click to show internal directories.
Click to hide internal directories.