Documentation
¶
Overview ¶
Package securityprovider contains some default securityprovider implementations, which can be used as a RequestEditorFn of a client.
Index ¶
Constants ¶
View Source
const ( // ErrAPIKeyInvalidIn indicates a usage of an invalid In. // Should be cookie, header or query ErrAPIKeyInvalidIn = Error("invalid 'in' specified for apiKey") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
type APIKey struct {
// contains filtered or unexported fields
}
APIKey will attach an apiKey either to a cookie, header or query.
type BasicAuth ¶
type BasicAuth struct {
// contains filtered or unexported fields
}
BasicAuth sends a base64-encoded combination of username, password along with a request.
func NewBasicAuth ¶
NewBasicAuth provides a BasicAuth, which can solve the BasicAuth challenge for api-calls.
type BearerToken ¶
type BearerToken struct {
// contains filtered or unexported fields
}
BearerToken sends a token as part of an Authorization: Bearer header along with a request.
func NewBearerToken ¶
func NewBearerToken(token string) (*BearerToken, error)
NewBearerToken provides a BearerToken, which can solve the Bearer Auth challende for api-calls.
Click to show internal directories.
Click to hide internal directories.