Documentation ¶
Overview ¶
Package shared contains shared data between the host and plugins.
Index ¶
- Variables
- type GRPCClient
- type GRPCServer
- type PasswordAuthenticatorPlugin
- func (*PasswordAuthenticatorPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
- func (p *PasswordAuthenticatorPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
- func (p *PasswordAuthenticatorPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
- func (p *PasswordAuthenticatorPlugin) Server(*plugin.MuxBroker) (interface{}, error)
- type RPCClient
- type RPCServer
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "AUTH_PLUGIN",
MagicCookieValue: "hello",
}
Handshake is a common handshake that is shared by plugin and host.
View Source
var PluginMap = map[string]plugin.Plugin{ "passwordAuthenticator": &PasswordAuthenticatorPlugin{}, }
Functions ¶
This section is empty.
Types ¶
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of PasswordAuthenticator that talks over gRPC.
func (*GRPCClient) Authenticate ¶
func (m *GRPCClient) Authenticate(username, password string) (bool, int32, error)
type GRPCServer ¶
type GRPCServer struct { Impl apis.PasswordAuthenticator // contains filtered or unexported fields }
Here is the gRPC server that GRPCClient talks to.
func (*GRPCServer) Authenticate ¶
func (m *GRPCServer) Authenticate( ctx context.Context, req *proto.CredentialsRequest) (*proto.AuthenticateResponse, error)
type PasswordAuthenticatorPlugin ¶
type PasswordAuthenticatorPlugin struct {
Impl apis.PasswordAuthenticator
}
func (*PasswordAuthenticatorPlugin) Client ¶
func (*PasswordAuthenticatorPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*PasswordAuthenticatorPlugin) GRPCClient ¶
func (p *PasswordAuthenticatorPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*PasswordAuthenticatorPlugin) GRPCServer ¶
func (p *PasswordAuthenticatorPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
func (*PasswordAuthenticatorPlugin) Server ¶
func (p *PasswordAuthenticatorPlugin) Server(*plugin.MuxBroker) (interface{}, error)
type RPCServer ¶
type RPCServer struct {
Impl apis.PasswordAuthenticator
}
Click to show internal directories.
Click to hide internal directories.