authproxy

package
v1.0.35 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyAuthConfig

type APIKeyAuthConfig struct {
	Enabled bool                   `json:"enabled,omitempty" xml:"enabled,omitempty" yaml:"enabled,omitempty"`
	Realms  map[string]interface{} `json:"realms,omitempty" xml:"realms,omitempty" yaml:"realms,omitempty"`
}

APIKeyAuthConfig is a config for API key-based authentication.

type Authenticator

type Authenticator interface {
	GetName() string
	BasicAuth(*Request) error
	APIKeyAuth(*Request) error
}

Authenticator is an interface to an identity store.

type BasicAuthConfig

type BasicAuthConfig struct {
	Enabled bool                   `json:"enabled,omitempty" xml:"enabled,omitempty" yaml:"enabled,omitempty"`
	Realms  map[string]interface{} `json:"realms,omitempty" xml:"realms,omitempty" yaml:"realms,omitempty"`
}

BasicAuthConfig is a config for basic authentication.

type Config

type Config struct {
	PortalName string           `json:"portal_name,omitempty" xml:"portal_name,omitempty" yaml:"portal_name,omitempty"`
	BasicAuth  BasicAuthConfig  `json:"basic_auth,omitempty" xml:"basic_auth,omitempty" yaml:"basic_auth,omitempty"`
	APIKeyAuth APIKeyAuthConfig `json:"api_key_auth,omitempty" xml:"api_key_auth,omitempty" yaml:"api_key_auth,omitempty"`
}

Config is a config for an identity provider.

func ParseConfig

func ParseConfig(lines []string) (*Config, error)

ParseConfig parses configuration into an identity provider config

type Request

type Request struct {
	Address  string   `json:"address,omitempty" xml:"address,omitempty" yaml:"address,omitempty"`
	Realm    string   `json:"realm,omitempty" xml:"realm,omitempty" yaml:"realm,omitempty"`
	Secret   string   `json:"secret,omitempty" xml:"secret,omitempty" yaml:"secret,omitempty"`
	Response Response `json:"response,omitempty" xml:"response,omitempty" yaml:"response,omitempty"`
}

Request is a request to an identity store via Authenticator.

type Response

type Response struct {
	Name    string `json:"name,omitempty" xml:"name,omitempty" yaml:"name,omitempty"`
	Payload string `json:"payload,omitempty" xml:"payload,omitempty" yaml:"payload,omitempty"`
}

Response is a response from identity store.

Jump to

Keyboard shortcuts

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