Documentation ¶
Index ¶
- func AddIdentity(redisAddr, name, password string) error
- func RemoveIdentity(redisAddr, name string) error
- func ServeRADIUS(ctx context.Context, sharedSecret, redis string) error
- type EAPAuthenticator
- type EAPAuthenticatorDiscardResult
- type EAPAuthenticatorEAPFailureResult
- type EAPAuthenticatorEAPRequestResult
- type EAPAuthenticatorEAPSuccessResult
- type EAPAuthenticatorRejectResult
- type EAPConnectionState
- type EAPCredentialProvider
- type EAPCredentials
- type RADIUSServer
- type RedisCredentialProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddIdentity ¶
func RemoveIdentity ¶
Types ¶
type EAPAuthenticator ¶
type EAPAuthenticator struct { Send func(b []byte, addr net.Addr) error CredentialProvider EAPCredentialProvider // contains filtered or unexported fields }
EAPAuthenticator implements a RADIUS server with minimal support for EAP authentication.
EAPAuthenticator is safe for concurrent use.
func (*EAPAuthenticator) Handle ¶
func (auth *EAPAuthenticator) Handle(b []byte, addr net.Addr) (interface{}, error)
Handles a RADIUS packet. Errors are returned for internal issues such as the authenticator's Send function returning an error. Under normal operation, even in cases such as malformed packets, a non-nil result and nil error are returned.
type EAPAuthenticatorDiscardResult ¶
type EAPAuthenticatorDiscardResult struct {
Reason error
}
type EAPAuthenticatorEAPRequestResult ¶
type EAPAuthenticatorEAPRequestResult struct {
Identity string
}
type EAPAuthenticatorEAPSuccessResult ¶
type EAPAuthenticatorEAPSuccessResult struct {
Identity string
}
type EAPAuthenticatorRejectResult ¶
type EAPAuthenticatorRejectResult struct {
Reason error
}
type EAPConnectionState ¶
type EAPCredentialProvider ¶
type EAPCredentialProvider interface {
CredentialsForIdentity(id string) (EAPCredentials, error)
}
type EAPCredentials ¶
type EAPCredentials interface {
PlaintextPassword() []byte
}
type RADIUSServer ¶
type RADIUSServer struct { Logger logrus.FieldLogger CredentialProvider EAPCredentialProvider // contains filtered or unexported fields }
func (*RADIUSServer) Start ¶
func (s *RADIUSServer) Start() error
func (*RADIUSServer) Stop ¶
func (s *RADIUSServer) Stop()
type RedisCredentialProvider ¶
type RedisCredentialProvider struct { Redis string // contains filtered or unexported fields }
func (*RedisCredentialProvider) CredentialsForIdentity ¶
func (p *RedisCredentialProvider) CredentialsForIdentity(id string) (EAPCredentials, error)
Click to show internal directories.
Click to hide internal directories.