Documentation ¶
Index ¶
- type Provider
- type TLSAuthProvider
- func (p *TLSAuthProvider) GetHTTPHeaders() (map[string]string, error)
- func (p *TLSAuthProvider) GetTLSCertificate() (*tls.Certificate, error)
- func (p *TLSAuthProvider) GetTLSConfig(certFile string, allowInsecureConnection bool) (*tls.Config, error)
- func (p *TLSAuthProvider) HasDataForHTTP() bool
- func (p *TLSAuthProvider) Init() error
- func (p *TLSAuthProvider) Name() string
- type TokenAuthProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶ added in v0.2.0
type Provider interface { // HasDataForHTTP is used to check if data for HTTP are available HasDataForHTTP() bool // GetHTTPHeaders is used to get all auth headers GetHTTPHeaders() (map[string]string, error) }
Provider provide a general method to add auth message
type TLSAuthProvider ¶
type TLSAuthProvider struct {
// contains filtered or unexported fields
}
func NewAuthenticationTLS ¶
func NewAuthenticationTLS(certificatePath string, privateKeyPath string, allowInsecureConnection bool) *TLSAuthProvider
NewAuthenticationTLS initialize the authentication provider
func (*TLSAuthProvider) GetHTTPHeaders ¶ added in v0.2.0
func (p *TLSAuthProvider) GetHTTPHeaders() (map[string]string, error)
func (*TLSAuthProvider) GetTLSCertificate ¶
func (p *TLSAuthProvider) GetTLSCertificate() (*tls.Certificate, error)
func (*TLSAuthProvider) GetTLSConfig ¶ added in v0.2.0
func (*TLSAuthProvider) HasDataForHTTP ¶ added in v0.2.0
func (p *TLSAuthProvider) HasDataForHTTP() bool
func (*TLSAuthProvider) Init ¶
func (p *TLSAuthProvider) Init() error
func (*TLSAuthProvider) Name ¶
func (p *TLSAuthProvider) Name() string
type TokenAuthProvider ¶
type TokenAuthProvider struct {
// contains filtered or unexported fields
}
func NewAuthenticationToken ¶
func NewAuthenticationToken(token string) *TokenAuthProvider
NewAuthenticationToken return a interface of Provider with a string token.
func NewAuthenticationTokenFromFile ¶
func NewAuthenticationTokenFromFile(tokenFilePath string) *TokenAuthProvider
NewAuthenticationTokenFromFile return a interface of a Provider with a string token file path.
func (*TokenAuthProvider) GetData ¶
func (p *TokenAuthProvider) GetData() ([]byte, error)
func (*TokenAuthProvider) GetHTTPHeaders ¶ added in v0.2.0
func (p *TokenAuthProvider) GetHTTPHeaders() (map[string]string, error)
func (*TokenAuthProvider) HasDataForHTTP ¶ added in v0.2.0
func (p *TokenAuthProvider) HasDataForHTTP() bool
func (*TokenAuthProvider) Init ¶
func (p *TokenAuthProvider) Init() error
Click to show internal directories.
Click to hide internal directories.