Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker stores a set of valid credentials to be used when authenticating HTTP requests using basic auth.
func NewChecker ¶
func NewChecker(credentials []Credential) *Checker
NewChecker returns a basic auth checker configured to use credentials when checking for valid authentication.
type Credential ¶
Credential is a valid username/password pair used to authenticate HTTP requests using basic auth.
type Credentials ¶
type Credentials []Credential
Credentials is a set of credentials with the added functionality of decoding.
func (*Credentials) Decode ¶
func (c *Credentials) Decode(repl string) error
Decode implements the envdecode contract, allowing Credentials to be used in config structs.
type GRPCCredentials ¶
GRPCCredentials implements PerRPCCredentials.
func (GRPCCredentials) GetRequestMetadata ¶
func (c GRPCCredentials) GetRequestMetadata(ctx context.Context, in ...string) (map[string]string, error)
GetRequestMetadata maps the given credentials to the appropriate request headers.
func (GRPCCredentials) RequireTransportSecurity ¶
func (c GRPCCredentials) RequireTransportSecurity() bool
RequireTransportSecurity implements PerRPCCredentials.