Documentation ¶
Index ¶
- Variables
- type AuthenticatorConfig
- type Config
- type Server
- func (s *Server) Authenticate(ctx context.Context, _ *api.AuthenticateRequest) (*api.AuthenticateResponse, error)
- func (s *Server) NewGRPCServer(authzClient authz.SubjectPurgeClient) *grpc.Server
- func (s *Server) Serve(grpcEndpoint, http1Endpoint string) error
- func (s *Server) ServeHTTP1(pbmux *runtime.ServeMux, http1Endpoint string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthenticatorsConfig = map[string]func() AuthenticatorConfig{ "mock-oidc": func() AuthenticatorConfig { return new(mock.OidcConfig) }, "mock-static": func() AuthenticatorConfig { return new(mock.StaticConfig) }, "mock-header-token": func() AuthenticatorConfig { return new(mock.HeaderTokenConfig) }, "oidc": func() AuthenticatorConfig { return new(oidc.Config) }, "header-token": func() AuthenticatorConfig { return new(tokens.HeaderTokenConfig) }, }
AuthenticatorsConfig variable provides an easy way to return a config struct depending on the authenticator type.
Functions ¶
This section is empty.
Types ¶
type AuthenticatorConfig ¶
type AuthenticatorConfig interface {
Open(*url.URL, *certs.ServiceCerts, *zap.Logger) (authenticator.Authenticator, error)
}
AuthenticatorConfig is a configuration that can open an authenticator.
type Config ¶
type Config struct { // These are the configs of the specified Authenticators, which will be // Open()ed when this config is passed to NewServer Authenticators map[string]AuthenticatorConfig Upstream *url.URL Logger *zap.Logger Token tokens.TokenConfig ServiceCerts *certs.ServiceCerts TeamsAddress string // "ip:port" AuthzAddress string LegacyDataCollectorToken string }
Config holds the server's configuration options.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the top level object.
func (*Server) Authenticate ¶
func (s *Server) Authenticate(ctx context.Context, _ *api.AuthenticateRequest) (*api.AuthenticateResponse, error)
Authenticate provides a quick and dirty api.AuthenticationServer implementation for *Server
func (*Server) NewGRPCServer ¶
func (s *Server) NewGRPCServer(authzClient authz.SubjectPurgeClient) *grpc.Server
NewGRPCServer returns a server that provides our services: token and authentication requests.
Click to show internal directories.
Click to hide internal directories.