auth

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitlabWebhookPluginName = "gitlab-webhook-auth"
	GitlabHeaderName        = "X-Gitlab-Token"
)
View Source
const (
	KeyAuthPluginName = "key-auth"
	KeyName           = "API-Token"
)
View Source
const (
	BasicAuthPluginName = "basic-auth"
)
View Source
const (
	GithubWebhookPluginName = "github-webhook-auth"
)
View Source
const (
	SlackWebhookPluginName = "slack-webhook-auth"
)

Variables

This section is empty.

Functions

func ConfigureBasicAuthPlugin

func ConfigureBasicAuthPlugin(config interface{}, _ string) (core.PluginInstance, error)

func ConfigureGithubWebhook

func ConfigureGithubWebhook(config interface{}, _ string) (core.PluginInstance, error)

func ConfigureGitlabWebhook added in v0.8.4

func ConfigureGitlabWebhook(config interface{}, _ string) (core.PluginInstance, error)

func ConfigureKeyAuthPlugin

func ConfigureKeyAuthPlugin(config interface{}, _ string) (core.PluginInstance, error)

func ConfigureSlackWebhook added in v0.8.4

func ConfigureSlackWebhook(config interface{}, _ string) (core.PluginInstance, error)

Types

type BasicAuthConfig

type BasicAuthConfig struct {
	AddUsernameHeader bool `mapstructure:"add_username_header" yaml:"add_username_header"`
	AddTagsHeader     bool `mapstructure:"add_tags_header"     yaml:"add_tags_header"`
	AddGroupsHeader   bool `mapstructure:"add_groups_header"   yaml:"add_groups_header"`
}

BasicAuthConfig configures a basic-auth plugin instance. The plugin can be configured to set consumer information (name, groups, tags).

type BasicAuthPlugin

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

func (*BasicAuthPlugin) Config

func (ba *BasicAuthPlugin) Config() interface{}

func (*BasicAuthPlugin) ExecutePlugin

func (ba *BasicAuthPlugin) ExecutePlugin(c *core.ConsumerFile,
	w http.ResponseWriter, r *http.Request,
) bool

func (*BasicAuthPlugin) Type

func (ba *BasicAuthPlugin) Type() string

type GithubWebhookPlugin

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

func (*GithubWebhookPlugin) Config

func (p *GithubWebhookPlugin) Config() interface{}

func (*GithubWebhookPlugin) ExecutePlugin

func (*GithubWebhookPlugin) Type

func (*GithubWebhookPlugin) Type() string

type GithubWebhookPluginConfig

type GithubWebhookPluginConfig struct {
	Secret string `mapstructure:"secret" yaml:"secret"`
}

type GitlabWebhookPlugin added in v0.8.4

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

func (*GitlabWebhookPlugin) Config added in v0.8.4

func (p *GitlabWebhookPlugin) Config() interface{}

func (*GitlabWebhookPlugin) ExecutePlugin added in v0.8.4

func (*GitlabWebhookPlugin) Type added in v0.8.4

func (*GitlabWebhookPlugin) Type() string

type GitlabWebhookPluginConfig added in v0.8.4

type GitlabWebhookPluginConfig struct {
	Secret string `mapstructure:"secret" yaml:"secret"`
}

type KeyAuthConfig

type KeyAuthConfig struct {
	AddUsernameHeader bool `mapstructure:"add_username_header" yaml:"add_username_header"`
	AddTagsHeader     bool `mapstructure:"add_tags_header"     yaml:"add_tags_header"`
	AddGroupsHeader   bool `mapstructure:"add_groups_header"   yaml:"add_groups_header"`

	// KeyName defines the header for the key
	KeyName string `mapstructure:"key_name" yaml:"key_name"`
}

KeyAuthConfig configures a key-auth plugin instance. The plugin can be configured to set consumer information (name, groups, tags) and the name of the header for the api key.

type KeyAuthPlugin

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

func (*KeyAuthPlugin) Config

func (ka *KeyAuthPlugin) Config() interface{}

func (*KeyAuthPlugin) ExecutePlugin

func (ka *KeyAuthPlugin) ExecutePlugin(c *core.ConsumerFile,
	w http.ResponseWriter, r *http.Request,
) bool

func (*KeyAuthPlugin) Type

func (ka *KeyAuthPlugin) Type() string

type SlackWebhookPlugin added in v0.8.4

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

func (*SlackWebhookPlugin) Config added in v0.8.4

func (p *SlackWebhookPlugin) Config() interface{}

func (*SlackWebhookPlugin) ExecutePlugin added in v0.8.4

func (*SlackWebhookPlugin) Type added in v0.8.4

func (*SlackWebhookPlugin) Type() string

type SlackWebhookPluginConfig added in v0.8.4

type SlackWebhookPluginConfig struct {
	Secret string `mapstructure:"secret" yaml:"secret"`
}

Jump to

Keyboard shortcuts

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