Documentation
¶
Index ¶
- type AbstractAuthenticationToken
- type AccountExpiredException
- type AccountStatusException
- type AccountStatusExceptionCause
- type AccountStatusExceptionCauseEnum
- type AnonymousAuthenticationToken
- type BadCredentialsException
- type CredentialsExpiredException
- type DisabledException
- type InternalAuthenticationException
- type LockedException
- type ProviderNotFoundException
- type RememberMeAuthenticationToken
- type UsernamePasswordAuthenticationToken
- func (this *UsernamePasswordAuthenticationToken) EraseCredentials()
- func (this *UsernamePasswordAuthenticationToken) GetCredentials() any
- func (this UsernamePasswordAuthenticationToken) New(principal, credentials any) *UsernamePasswordAuthenticationToken
- func (this UsernamePasswordAuthenticationToken) NewAuthenticated(principal, credentials any, authorities []GrantedAuthority) *UsernamePasswordAuthenticationToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractAuthenticationToken ¶
type AbstractAuthenticationToken struct {
Principal any `json:"principal"`
Authorities []GrantedAuthority `json:"authorities"`
Authenticated bool `json:"authenticated"`
}
func (*AbstractAuthenticationToken) GetAuthorities ¶
func (this *AbstractAuthenticationToken) GetAuthorities() []GrantedAuthority
GetAuthorities() implements [Authentication.GetAuthorities]
func (*AbstractAuthenticationToken) GetName ¶
func (this *AbstractAuthenticationToken) GetName() string
GetName() implements [Principal.GetName]
func (*AbstractAuthenticationToken) GetPrincipal ¶
func (this *AbstractAuthenticationToken) GetPrincipal() any
GetPrincipal() implements [Authentication.GetCredentials].
func (*AbstractAuthenticationToken) IsAuthenticated ¶
func (this *AbstractAuthenticationToken) IsAuthenticated() bool
IsAuthenticated() implements [Authentication.IsAuthenticated]
type AccountExpiredException ¶
type AccountExpiredException struct {
// contains filtered or unexported fields
}
AccountExpiredException is an AccountStatusException used to describe an [AuthenticationError] raised when an account is marked as expired.
func (*AccountExpiredException) AccountStatus ¶
func (this *AccountExpiredException) AccountStatus() AccountStatusExceptionCause
AccountStatus() implements AccountStatusException.AccountStatus.
func (AccountExpiredException) New ¶
func (this AccountExpiredException) New(message string, authentication Authentication) *AccountExpiredException
New() is the constructor for AccountExpiredException.
type AccountStatusException ¶
type AccountStatusException interface {
AuthenticationException
AccountStatus() AccountStatusExceptionCause
}
AccountStatusException is a specialized [AuthenticationException] interface used to describe that an account may not me valid.
type AccountStatusExceptionCause ¶
type AccountStatusExceptionCause = Enum[AccountStatusExceptionCauseEnum]
AccountStatusExceptionCause is an Enum alias for AccountStatusExceptionCauseEnum
type AccountStatusExceptionCauseEnum ¶
type AccountStatusExceptionCauseEnum struct {
ACCOUNT_EXPIRED,
CREDENTIALS_EXPIRED,
DISABLED,
LOCKED AccountStatusExceptionCause
}
AccountStatusExceptionCauseEnum is a Enum type representing a separate reason an account may not be valid.
type AnonymousAuthenticationToken ¶
type AnonymousAuthenticationToken struct {
AbstractAuthenticationToken
}
AnonymousAuthenticationToken is an implementation of [Authentication] representing an unauthenticated user.
func (*AnonymousAuthenticationToken) GetCredentials ¶
func (this *AnonymousAuthenticationToken) GetCredentials() any
GetCredentials() implements [Authentication.GetCredentials].
func (AnonymousAuthenticationToken) New ¶
func (this AnonymousAuthenticationToken) New() *AnonymousAuthenticationToken
New() is the constructor for AnonymousAuthenticationToken.
type BadCredentialsException ¶
type BadCredentialsException struct {
// contains filtered or unexported fields
}
BadCredentialsException is an [AuthenticationException] used to report an authentication error resulted from an incorrect authentication credentials.
func (*BadCredentialsException) AuthenticationRequest ¶
func (this *BadCredentialsException) AuthenticationRequest() Authentication
) () implements [AuthenticationException.) ].
func (BadCredentialsException) New ¶
func (this BadCredentialsException) New(msg string, authentication Authentication) *BadCredentialsException
New() create a new BadCredentialsException with the provided message
type CredentialsExpiredException ¶
type CredentialsExpiredException struct {
// contains filtered or unexported fields
}
CredentialsExpiredException is an AccountStatusException used to describe an [AuthenticationError] raised when an account credentials is marked as expired.
func (*CredentialsExpiredException) AccountStatus ¶
func (this *CredentialsExpiredException) AccountStatus() AccountStatusExceptionCause
AccountStatus() implements AccountStatusException.AccountStatus.
func (CredentialsExpiredException) New ¶
func (this CredentialsExpiredException) New(message string, authentication Authentication) *CredentialsExpiredException
New() is the constructor for CredentialsExpiredException.
type DisabledException ¶
type DisabledException struct {
// contains filtered or unexported fields
}
AccountExpiredException is an AccountStatusException used to describe an [AuthenticationError] raised when an account is marked as disabled.
func (*DisabledException) AccountStatus ¶
func (this *DisabledException) AccountStatus() AccountStatusExceptionCause
AccountStatus() implements AccountStatusException.AccountStatus.
func (DisabledException) New ¶
func (this DisabledException) New(message string, authentication Authentication) *DisabledException
New() is the constructor for DisabledException.
type InternalAuthenticationException ¶
type InternalAuthenticationException struct {
// contains filtered or unexported fields
}
InternalAuthenticationException is the fallthrough [AuthenticationException] returned in case of a problem in the aurthentication process.
func (*InternalAuthenticationException) AuthenticationRequest ¶
func (this *InternalAuthenticationException) AuthenticationRequest() Authentication
) () implements [AuthenticationException.) ].
func (InternalAuthenticationException) New ¶
func (this InternalAuthenticationException) New(message string, authentication Authentication) *InternalAuthenticationException
New() create a new InternalAuthenticationException with the provided message.
type LockedException ¶
type LockedException struct {
// contains filtered or unexported fields
}
AccountExpiredException is an AccountStatusException used to describe an [AuthenticationError] raised when an account is marked as locked.
func (*LockedException) AccountStatus ¶
func (this *LockedException) AccountStatus() AccountStatusExceptionCause
AccountStatus() implements AccountStatusException.AccountStatus.
func (LockedException) New ¶
func (this LockedException) New(message string, authentication Authentication) *LockedException
New() is the constructor for LockedException.
type ProviderNotFoundException ¶
type ProviderNotFoundException struct {
// contains filtered or unexported fields
}
ProviderNotFoundException is an [AuthenticationException] used to report if no [AuthenticationProvider] could be found by the [AuthenticationManager].
func (*ProviderNotFoundException) AuthenticationRequest ¶
func (this *ProviderNotFoundException) AuthenticationRequest() Authentication
) () implements [AuthenticationException.) ].
func (ProviderNotFoundException) New ¶
func (this ProviderNotFoundException) New(msg string, authentication Authentication) *ProviderNotFoundException
New() creates a new ProviderNotFoundException with the provided message.
type RememberMeAuthenticationToken ¶
type RememberMeAuthenticationToken struct {
Key string
AbstractAuthenticationToken
}
RememberMeAuthenticationToken is an implementation of [Authentication] representing an user authenticated by a [RememberMeService].
func (*RememberMeAuthenticationToken) GetCredentials ¶
func (this *RememberMeAuthenticationToken) GetCredentials() any
GetCredentials() implements [Authentication.GetCredentials].
func (RememberMeAuthenticationToken) New ¶
func (this RememberMeAuthenticationToken) New(key string, principal any, authorities []GrantedAuthority) *RememberMeAuthenticationToken
New() is the constructor for RememberMeAuthenticationToken.
type UsernamePasswordAuthenticationToken ¶
type UsernamePasswordAuthenticationToken struct {
AbstractAuthenticationToken
// contains filtered or unexported fields
}
UsernamePasswordAuthenticationToken is an implementation of Authentication representing an authentication by username and password.
func (*UsernamePasswordAuthenticationToken) EraseCredentials ¶
func (this *UsernamePasswordAuthenticationToken) EraseCredentials()
EraseCredentials() implements [CredentialsContainer.EraseCredentials]
func (*UsernamePasswordAuthenticationToken) GetCredentials ¶
func (this *UsernamePasswordAuthenticationToken) GetCredentials() any
GetCredentials() implements [Authentication.GetCredentials].
func (UsernamePasswordAuthenticationToken) New ¶
func (this UsernamePasswordAuthenticationToken) New(principal, credentials any) *UsernamePasswordAuthenticationToken
New() is the constructor for an unauthenticated UsernamePasswordAuthenticationToken.
func (UsernamePasswordAuthenticationToken) NewAuthenticated ¶
func (this UsernamePasswordAuthenticationToken) NewAuthenticated(principal, credentials any, authorities []GrantedAuthority) *UsernamePasswordAuthenticationToken
NewAuthenticated() is the constructor for an authenticated UsernamePasswordAuthenticationToken.