Versions in this module Expand all Collapse all v1 v1.0.0 Oct 2, 2023 Changes in this version + var BadCredentials = exception.New(http.StatusUnauthorized, "Bad credentials") + type Authentication interface + Authenticated func() bool + Authorities func() []authority.GrantedAuthority + Credentials func() interface{} + Details func() user.Details + Principal func() interface{} + type AuthenticationManager interface + Authenticate func(authentication Authentication) (Authentication, error) + type AuthenticationProvider interface + Supports func(authentication Authentication) bool + type BaseAuthentication struct + func NewBaseAuthentication(authorities []authority.GrantedAuthority) *BaseAuthentication + func (b *BaseAuthentication) SetAuthenticated(authenticated bool) + func (b *BaseAuthentication) SetUserDetails(userDetails user.Details) + func (b BaseAuthentication) Authenticated() bool + func (b BaseAuthentication) Authorities() []authority.GrantedAuthority + func (b BaseAuthentication) Details() user.Details + type CredentialsContainer interface + EraseCredentials func() + type JwtAuthProvider struct + func NewJwtAuthProvider() *JwtAuthProvider + func (j JwtAuthProvider) Authenticate(authentication Authentication) (Authentication, error) + func (j JwtAuthProvider) Supports(authentication Authentication) bool + type JwtTokenAuthentication struct + func NewJwtTokenAuthentication(userDetails user.Details, authorities []authority.GrantedAuthority, ...) *JwtTokenAuthentication + func (j *JwtTokenAuthentication) Credentials() interface{} + func (j *JwtTokenAuthentication) Principal() interface{} + func (j JwtTokenAuthentication) Claims() jwt.MapClaims + type ProviderManager struct + func NewProviderManager(providers ...AuthenticationProvider) *ProviderManager + func (p *ProviderManager) AddProvider(provider AuthenticationProvider) + func (p *ProviderManager) Authenticate(authentication Authentication) (result Authentication, err error) + type UsernamePasswordAuthProvider struct + func NewUsernamePasswordAuthProvider(userService user.Service, passwordEncoder crypto.PasswordEncoder) *UsernamePasswordAuthProvider + func (j UsernamePasswordAuthProvider) Authenticate(authentication Authentication) (Authentication, error) + func (j UsernamePasswordAuthProvider) Supports(authentication Authentication) bool + type UsernamePasswordAuthentication struct + func NewUsernamePasswordAuthentication(principal interface{}, credentials interface{}, ...) *UsernamePasswordAuthentication + func (u *UsernamePasswordAuthentication) Credentials() interface{} + func (u *UsernamePasswordAuthentication) EraseCredentials() + func (u *UsernamePasswordAuthentication) Principal() interface{}