Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicAuthFieldSpec ¶
BasicAuthFieldSpec returns a basic authentication field spec.
func FieldSpecs ¶
func FieldSpecs() docs.FieldSpecs
FieldSpecs returns a map of field specs for an auth type.
func FieldSpecsExpanded ¶
func FieldSpecsExpanded() docs.FieldSpecs
FieldSpecsExpanded includes OAuth2 and JWT fields that might not be appropriate for all components.
Types ¶
type BasicAuthConfig ¶
type BasicAuthConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Username string `json:"username" yaml:"username"`
Password string `json:"password" yaml:"password"`
}
BasicAuthConfig contains fields for setting basic authentication in HTTP requests.
func NewBasicAuthConfig ¶
func NewBasicAuthConfig() BasicAuthConfig
NewBasicAuthConfig returns a default configuration for basic authentication in HTTP client requests.
type Config ¶
type Config struct {
OAuth OAuthConfig `json:"oauth" yaml:"oauth"`
BasicAuth BasicAuthConfig `json:"basic_auth" yaml:"basic_auth"`
JWT JWTConfig `json:"jwt" yaml:"jwt"`
}
Config contains configuration params for various HTTP auth strategies.
type JWTConfig ¶
type JWTConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Claims jwt.MapClaims `json:"claims" yaml:"claims"`
Headers map[string]interface{} `json:"headers" yaml:"headers"`
SigningMethod string `json:"signing_method" yaml:"signing_method"`
PrivateKeyFile string `json:"private_key_file" yaml:"private_key_file"`
// contains filtered or unexported fields
}
JWTConfig holds the configuration parameters for an JWT exchange.
func NewJWTConfig ¶
func NewJWTConfig() JWTConfig
NewJWTConfig returns a new JWTConfig with default values.
type OAuth2Config ¶
type OAuth2Config struct {
Enabled bool `json:"enabled" yaml:"enabled"`
ClientKey string `json:"client_key" yaml:"client_key"`
ClientSecret string `json:"client_secret" yaml:"client_secret"`
TokenURL string `json:"token_url" yaml:"token_url"`
Scopes []string `json:"scopes" yaml:"scopes"`
}
OAuth2Config holds the configuration parameters for an OAuth2 exchange.
func NewOAuth2Config ¶
func NewOAuth2Config() OAuth2Config
NewOAuth2Config returns a new OAuth2Config with default values.
type OAuthConfig ¶
type OAuthConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
ConsumerKey string `json:"consumer_key" yaml:"consumer_key"`
ConsumerSecret string `json:"consumer_secret" yaml:"consumer_secret"`
AccessToken string `json:"access_token" yaml:"access_token"`
AccessTokenSecret string `json:"access_token_secret" yaml:"access_token_secret"`
}
OAuthConfig holds the configuration parameters for an OAuth exchange.
func NewOAuthConfig ¶
func NewOAuthConfig() OAuthConfig
NewOAuthConfig returns a new OAuthConfig with default values.
type WebsocketConfig ¶
type WebsocketConfig struct {
OAuth OAuthConfig `json:"oauth" yaml:"oauth"`
BasicAuth BasicAuthConfig `json:"basic_auth" yaml:"basic_auth"`
JWT JWTConfig `json:"jwt" yaml:"jwt"`
}
WebsocketConfig contains configuration params for various HTTP auth strategies suitable for websockets.
func NewWebsocketConfig ¶
func NewWebsocketConfig() WebsocketConfig
NewWebsocketConfig creates a new WebsocketConfig with default values.