rest

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultListenAddress = "0.0.0.0:9090"
View Source
const SessionName = "hpcwaas-session"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthAccount

type AuthAccount struct {
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
}

type AuthConfig

type AuthConfig struct {
	AuthType        string           `mapstructure:"auth_type,omitempty"`
	BasicAuth       *BasicAuthConfig `mapstructure:"basic_auth,omitempty"`
	AuthURL         string           `mapstructure:"auth_url,omitempty"`
	TokenURL        string           `mapstructure:"token_url,omitempty"`
	UserInfoURL     string           `mapstructure:"user_info_url,omitempty"`
	RedirectURL     string           `mapstructure:"redirect_url,omitempty"`
	Scopes          []string         `mapstructure:"scopes,omitempty"`
	SessionDuration int64            `mapstructure:"session_duration,omitempty"`
	ClientID        string           `mapstructure:"client_id,omitempty"`
	ClientSecret    string           `mapstructure:"client_secret,omitempty"`

	// OAuth2 confiuguration
	OAuth2 *oauth2.Config
	// Random state to protect against Cross-Site Request Forgery (CSRF)
	State string
}

type BasicAuthConfig

type BasicAuthConfig struct {
	Accounts []AuthAccount `mapstructure:"accounts"`
}

type Config

type Config struct {
	ListenAddress string       `mapstructure:"listen_address"`
	AlienConfig   a4c.Config   `mapstructure:"alien_config"`
	VaultConfig   vault.Config `mapstructure:"vault_config"`
	Auth          AuthConfig   `mapstructure:"auth"`
}

type Server

type Server struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*Server) StartServer

func (s *Server) StartServer() error

Jump to

Keyboard shortcuts

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