package
1.24.0
Repository: https://github.com/elastic/cloud-sdk-go.git
Documentation: pkg.go.dev

# Functions

NewAPIKey constructs a new APIKey, returns an error if the key is invalid.
NewAuthWriter creates a new instance of one of the implementations of Writer *APIKey or *UserLogin.
NewUserLogin creates a UserLogin from a username and password.

# Variables

ErrNoTokenAvailable should be returned by any implementations which fail to find any persisted token for the user.

# Structs

Config to create e new AuthWriters.
GenericHolder is a simple implementation of TokenHandler which persists the token in an inmemory struct field which is guarded by a RWMutex.
RefreshTokenParams is used to refresh a bearer token, which is necessary before its validity expires.
UserLogin uses a user's username and password to login against the Login API Endpoint.

# Interfaces

TokenHandler is an interface which abstracts the application management of JWT Bearer tokens.
Writer wraps the runtime.ClientAuthInfoWriter interface adding a method to Auth generic http.Request.

# Type aliases

APIKey represents an APIKey used in the Authorization header as means of authentication.