auth

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basic

type Basic struct {
	Enabled  bool   `json:"enabled"`
	User     string `json:"user"`
	Password string `json:"password"`
}

Basic represents object for basic authentication

type Config

type Config struct {
	Basic  Basic  `json:"basic"`
	OAuth2 OAuth2 `json:"oauth2"`
	X509   X509   `json:"x509"`
}

Config represents object for authentication

func (*Config) IsValid

func (config *Config) IsValid() bool

IsValid is used to check if is only one auth method selected

type OAuth2

type OAuth2 struct {
	Enabled      bool         `json:"enabled"`
	TokenURL     string       `json:"tokenUrl"`
	AuthURL      string       `json:"authUrl"`
	ClientID     string       `json:"clientId"`
	ClientSecret string       `json:"clientSecret"`
	Scopes       []string     `json:"scopes"`
	CachedToken  oauth2.Token `json:"cachedToken,omitempty"`
}

OAuth2 represents object for oauth2 authentication

type X509

type X509 struct {
	Enabled  bool   `json:"enabled"`
	CertPath string `json:"certPath"`
	KeyPath  string `json:"keyPath"`
	Cert     string `json:"cert"`
	Key      string `json:"key"`
}

X509 represents object for x509 authentication

Jump to

Keyboard shortcuts

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