Documentation
¶
Overview ¶
Package authentication defines interfaces for coordinator and communication server authentication
Index ¶
- type ClientAuthenticator
- type CoordinatorAuthenticator
- type NoopAuthenticator
- func (a *NoopAuthenticator) AuthenticateFromMessage(role protocol.Role, bytes []byte) (bool, []byte, error)
- func (a *NoopAuthenticator) AuthenticateFromURL(role protocol.Role, r *http.Request) (bool, error)
- func (a *NoopAuthenticator) GenerateClientAuthMessage() (*protocol.AuthMessage, error)
- func (a *NoopAuthenticator) GenerateClientConnectURL(coordinatorURL string) (string, error)
- func (a *NoopAuthenticator) GenerateServerAuthMessage() (*protocol.AuthMessage, error)
- func (a *NoopAuthenticator) GenerateServerConnectURL(coordinatorURL string, role protocol.Role) (string, error)
- type ServerAuthenticator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientAuthenticator ¶
type ClientAuthenticator interface { GenerateClientAuthMessage() (*protocol.AuthMessage, error) GenerateClientConnectURL(coordinatorURL string) (string, error) }
ClientAuthenticator is the client authentication mechanism, used for simulation only
type CoordinatorAuthenticator ¶
type CoordinatorAuthenticator interface {
AuthenticateFromURL(role protocol.Role, r *http.Request) (bool, error)
}
CoordinatorAuthenticator is the coordinator authentication mechanism
type NoopAuthenticator ¶
type NoopAuthenticator struct{}
NoopAuthenticator is a Server|Coordinator|Client authenticator that does nothing
func (*NoopAuthenticator) AuthenticateFromMessage ¶
func (a *NoopAuthenticator) AuthenticateFromMessage(role protocol.Role, bytes []byte) (bool, []byte, error)
AuthenticateFromMessage always return true
func (*NoopAuthenticator) AuthenticateFromURL ¶
AuthenticateFromURL always return true
func (*NoopAuthenticator) GenerateClientAuthMessage ¶
func (a *NoopAuthenticator) GenerateClientAuthMessage() (*protocol.AuthMessage, error)
GenerateClientAuthMessage generates client empty auth message
func (*NoopAuthenticator) GenerateClientConnectURL ¶
func (a *NoopAuthenticator) GenerateClientConnectURL(coordinatorURL string) (string, error)
GenerateClientConnectURL generates CoordinatorURL with no parameters
func (*NoopAuthenticator) GenerateServerAuthMessage ¶
func (a *NoopAuthenticator) GenerateServerAuthMessage() (*protocol.AuthMessage, error)
GenerateServerAuthMessage generates server empty auth message
func (*NoopAuthenticator) GenerateServerConnectURL ¶
func (a *NoopAuthenticator) GenerateServerConnectURL(coordinatorURL string, role protocol.Role) (string, error)
GenerateServerConnectURL generates CoordinatorURL with no parameters
type ServerAuthenticator ¶
type ServerAuthenticator interface { AuthenticateFromMessage(role protocol.Role, bytes []byte) (bool, []byte, error) GenerateServerAuthMessage() (*protocol.AuthMessage, error) GenerateServerConnectURL(coordinatorURL string, role protocol.Role) (string, error) }
ServerAuthenticator is the communication server authentication mechanism