server

package
v0.0.0-...-c5ebd6f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2015 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRequest

type AuthRequest struct {
	RemoteAddr string
	User       string
	Password   authn.PasswordString
	// contains filtered or unexported fields
}

func (AuthRequest) String

func (ar AuthRequest) String() string

type AuthServer

type AuthServer struct {
	// contains filtered or unexported fields
}

func NewAuthServer

func NewAuthServer(c *Config) (*AuthServer, error)

func (*AuthServer) Authenticate

func (as *AuthServer) Authenticate(ar *AuthRequest) (bool, error)

func (*AuthServer) Authorize

func (as *AuthServer) Authorize(ar *AuthRequest) ([]string, error)

func (*AuthServer) ParseRequest

func (as *AuthServer) ParseRequest(req *http.Request) (*AuthRequest, error)

func (*AuthServer) ServeHTTP

func (as *AuthServer) ServeHTTP(rw http.ResponseWriter, req *http.Request)

func (*AuthServer) Stop

func (as *AuthServer) Stop()

type Config

type Config struct {
	Server     ServerConfig                   `yaml:"server"`
	Token      TokenConfig                    `yaml:"token"`
	Users      map[string]*authn.Requirements `yaml:"users,omitempty"`
	GoogleAuth *authn.GoogleAuthConfig        `yaml:"google_auth,omitempty"`
	LDAPAuth   *authn.LDAPAuthConfig          `yaml:"ldap_auth,omitempty"`
	ACL        authz.ACL                      `yaml:"acl"`
}

func LoadConfig

func LoadConfig(fileName string) (*Config, error)

type ServerConfig

type ServerConfig struct {
	ListenAddress string `yaml:"addr,omitempty"`
	CertFile      string `yaml:"certificate,omitempty"`
	KeyFile       string `yaml:"key,omitempty"`
	// contains filtered or unexported fields
}

type TokenConfig

type TokenConfig struct {
	Issuer     string `yaml:"issuer,omitempty"`
	CertFile   string `yaml:"certificate,omitempty"`
	KeyFile    string `yaml:"key,omitempty"`
	Expiration int64  `yaml:"expiration,omitempty"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL