securityprovider
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package securityprovider contains some default securityproviderimplementations, which can be used as a RequestEditorFn of aclient.
Index¶
Constants¶
const (// ErrSecurityProviderApiKeyInvalidIn indicates a usage of an invalid In.// Should be cookie, header or queryErrSecurityProviderApiKeyInvalidIn =SecurityProviderError("invalid 'in' specified for apiKey"))
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeSecurityProviderApiKey¶
type SecurityProviderApiKey struct {// contains filtered or unexported fields}
SecurityProviderApiKey will attach an apiKey either to acookie, header or query.
funcNewSecurityProviderApiKey¶
func NewSecurityProviderApiKey(in, name, apiKeystring) (*SecurityProviderApiKey,error)
NewSecurityProviderApiKey will attach a generic apiKey for a given nameeither to a cookie, header or as a query parameter.
typeSecurityProviderBasicAuth¶
type SecurityProviderBasicAuth struct {// contains filtered or unexported fields}
SecurityProviderBasicAuth sends a base64-encoded combination ofusername, password along with a request.
funcNewSecurityProviderBasicAuth¶
func NewSecurityProviderBasicAuth(username, passwordstring) (*SecurityProviderBasicAuth,error)
NewSecurityProviderBasicAuth provides a SecurityProvider, which can solvethe BasicAuth challenge for api-calls.
typeSecurityProviderBearerToken¶
type SecurityProviderBearerToken struct {// contains filtered or unexported fields}
SecurityProviderBearerToken sends a token as part of anAuthorization: Bearer header along with a request.
funcNewSecurityProviderBearerToken¶
func NewSecurityProviderBearerToken(tokenstring) (*SecurityProviderBearerToken,error)
NewSecurityProviderBearerToken provides a SecurityProvider, which can solvethe Bearer Auth challenge for api-calls.
typeSecurityProviderError¶
type SecurityProviderErrorstring
SecurityProviderError defines error values of a security provider.
func (SecurityProviderError)Error¶
func (eSecurityProviderError) Error()string
Error implements the error interface.